From 4792e31b0f72068cb2cbc7045c90fdcbe72d30c7 Mon Sep 17 00:00:00 2001 From: AlephAlpha Date: Sun, 25 Feb 2024 12:51:06 +0800 Subject: [PATCH] :skull: --- CHANGELOG.md | 2 +- analysis/Ideas.md | 8 ++++++ analysis/corpus.txt | 6 +++- analysis/freq_1gram.txt | 53 ++++++++++++++++++------------------ analysis/freq_2gram.txt | 38 ++++++++++++++++++-------- analysis/freq_3gram.txt | 27 +++++++++++++++--- analysis/freq_4gram.txt | 22 +++++++++++++-- analysis/freq_5gram.txt | 16 +++++++++-- analysis/particles.txt | 6 ++-- doc/Builtins.md | 8 ++++++ doc/CodePage.md | 6 ++-- src/Nekomata/Builtin.hs | 9 ++++++ src/Nekomata/Builtin/List.hs | 9 ++++++ src/Nekomata/CodePage.hs | 6 ++-- test/Eval.hs | 46 ++++++++++++++++++++++++++++++- 15 files changed, 204 insertions(+), 58 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 57bae8a..85c124c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,7 +6,7 @@ * Fixed a bug in printing truncated results. * Now characters are internally represented as `Word8`s instead of `Char`s. * Added a REPL command `\Arity` to print the arity of a function. -* New built-in functions: `elem`, `\minValue`, `\minMax`, `\maxValue`, `\ordering`, `\pad`, `\slices`. +* New built-in functions: `elem`, `\filterBy`, `\minValue`, `\minMax`, `\maxValue`, `\ordering`, `\pad`, `\slices`. ### Breaking changes diff --git a/analysis/Ideas.md b/analysis/Ideas.md index 616758b..40a7b38 100644 --- a/analysis/Ideas.md +++ b/analysis/Ideas.md @@ -157,6 +157,14 @@ LiberationMono 字体所支持的字符列举于[此文件](analysis/LiberationM - [ ] `\onAny`:助词,将一个函数应用到列表的任意一个元素上。比如说 `[1,2,3] \onAny \increment` 有三种可能的结果:`[2,2,3]`、`[1,3,3]`、`[1,2,4]`。 +### [Remove falsy rows and columns](https://codegolf.stackexchange.com/q/269954/9288) + +``` +\isNonzero \dup \transpose \removeFail \transpose \swap \filterBy +``` + +- [ ] `\filterBy`:输入两个列表,其长度必须一致。根据第二个列表的元素是否为 Fail,将第一个列表的元素过滤。比如输入 `[1,2,3,4]` 和 `[4,Fail,2,Fail]`,输出 `[1,3]`。 + ## 关于字符串 从 v0.5.0.0 开始,Nekomata 将不再区分字符串和列表,增加了一个字符类型,当一个列表的全部元素都是字符时,就视为一个字符串。字符串和列表只在输入输出时有区别,其它时候都是一样的。 diff --git a/analysis/corpus.txt b/analysis/corpus.txt index 7ea2977..94b0fd1 100644 --- a/analysis/corpus.txt +++ b/analysis/corpus.txt @@ -78,7 +78,7 @@ NZ ĕ^ṁ 1M ĭZĬ‼ -¬∫½ᶻ¿‼ +¬∫½ḟ uᵐhů ƒy1|∏ ř∏ @@ -316,3 +316,7 @@ oOᵐůj ≈đG← ʷ{Ƶþ Jtđ= +ᵋ*+-Ď~2> +RJ:ᵐhmj↕ũh= +Z:Ť‼Ť$ḟ +ŧĉᵐz diff --git a/analysis/freq_1gram.txt b/analysis/freq_1gram.txt index 1530832..7401d85 100644 --- a/analysis/freq_1gram.txt +++ b/analysis/freq_1gram.txt @@ -1,70 +1,71 @@ { : 70 -$ : 51 -: : 45 -= : 43 +$ : 52 +: : 47 += : 44 ++ : 40 ∑ : 40 -+ : 39 -ᵐ : 36 +ᵐ : 38 ← : 30 +R : 30 +* : 29 → : 29 -R : 29 -* : 28 +- : 26 } : 26 -- : 25 +j : 24 1 : 23 -j : 23 x : 23 , : 21 o : 21 ç : 21 +2 : 21 ᵉ : 20 a : 20 -2 : 20 +Ť : 18 u : 18 ᵒ : 18 ↔ : 18 # : 17 +~ : 17 3 : 16 +↕ : 16 ĭ : 16 -Ť : 16 l : 16 đ : 16 p : 16 -~ : 16 -↕ : 15 ᵖ : 15 " : 14 Ƃ : 14 t : 14 +ĉ : 14 Ð : 14 +J : 13 S : 13 Ɔ : 13 ∫ : 13 Ɗ : 13 Ň : 13 -ĉ : 13 ; : 13 L : 13 ᶦ : 12 -J : 12 < : 12 q : 12 N : 12 ½ : 12 +Z : 12 ᵑ : 12 Ṁ : 12 +z : 11 Q : 11 -ᶻ : 11 ≡ : 11 -Z : 11 c : 11 ± : 11 _ : 11 ʷ : 10 ᵗ : 10 -z : 10 +ũ : 10 Ţ : 10 ᵃ : 10 +ᶻ : 10 r : 10 E : 10 ŋ : 10 @@ -74,7 +75,6 @@ E : 10 O : 10 ∆ : 10 ᶜ : 9 -ũ : 9 ˡ : 9 ž : 9 ᶠ : 9 @@ -101,6 +101,7 @@ f : 7 Ĉ : 7 ṁ : 7 Ĩ : 7 +h : 7 ä : 7 4 : 7 i : 7 @@ -108,10 +109,12 @@ i : 7 @ : 7 ᵏ : 6 ƃ : 6 +Ď : 6 Ø : 6 Ĭ : 6 ¦ : 6 ş : 6 +> : 6 ∩ : 6 Ř : 6 į : 6 @@ -123,9 +126,9 @@ y : 5 Ö : 5 H : 5 d : 5 -Ď : 5 ≤ : 5 Ç : 5 +ŧ : 5 ʳ : 5 G : 5 Å : 5 @@ -133,18 +136,15 @@ s : 5 ɔ : 5 µ : 5 ĕ : 5 -¿ : 5 -h : 5 8 : 5 √ : 5 5 : 5 -> : 5 Þ : 5 0 : 5 +ᵋ : 5 b : 5 A : 5 ř : 4 -ŧ : 4 k : 4 F : 4 ƥ : 4 @@ -154,9 +154,9 @@ M : 4 ÷ : 4 § : 4 & : 4 +¿ : 4 ˣ : 4 ň : 4 -ᵋ : 4 õ : 4 ĝ : 3 Ṃ : 3 @@ -170,6 +170,7 @@ X : 3 ï : 3 å : 3 U : 3 +m : 3 Ṗ : 3 v : 3 ' : 3 @@ -177,11 +178,11 @@ v : 3 g : 2 ɱ : 2 ^ : 2 +ḟ : 2 ē : 2 Ḟ : 2 K : 2 6 : 2 -m : 2 Š : 2 ¥ : 2 Ĝ : 1 diff --git a/analysis/freq_2gram.txt b/analysis/freq_2gram.txt index 376e6d2..2a58e13 100644 --- a/analysis/freq_2gram.txt +++ b/analysis/freq_2gram.txt @@ -18,6 +18,8 @@ Jᵐ : 4 1Ĩ : 4 ᵏ{ : 4 ᵒ{ : 4 +ĉᵐ : 4 +↕ũ : 4 Ňᵖ : 4 aş : 4 ᵗz : 3 @@ -48,7 +50,6 @@ R: : 3 :∙ : 3 2R : 3 &Þ : 3 -ĉᵐ : 3 xŘ : 3 -_ : 3 u# : 3 @@ -56,7 +57,6 @@ u# : 3 pN : 3 {ˣ : 3 {į : 3 -↕ũ : 3 x: : 3 +} : 3 *$ : 3 @@ -127,6 +127,7 @@ aj : 2 E∑ : 2 o; : 2 ↔ᶻ : 2 +ᵐh : 2 *4 : 2 +→ : 2 Qƥ : 2 @@ -153,6 +154,7 @@ Sđ : 2 qŤ : 2 ;$ : 2 N, : 2 +Z: : 2 ½$ : 2 oĉ : 2 oĭ : 2 @@ -166,6 +168,7 @@ $đ : 2 _= : 2 Ṁ→ : 2 -ň : 2 +:ᵐ : 2 0* : 2 $ᶻ : 2 ᶻL : 2 @@ -199,6 +202,7 @@ ut : 2 :# : 2 ĭ? : 2 {* : 2 +*+ : 2 +$ : 2 ᵃ{ : 2 x- : 2 @@ -219,6 +223,7 @@ jŢ : 2 rj : 2 ↕∆ : 2 ←_ : 2 +ŧĉ : 2 :, : 2 {R : 2 #ᵑ : 2 @@ -226,6 +231,7 @@ rj : 2 ĭ, : 2 Jĭ : 2 ←ᶠ : 2 +ᵐz : 2 ," : 1 :ᶦ : 1 $ᵉ : 1 @@ -406,11 +412,8 @@ ZĬ : 1 Ĭ‼ : 1 ¬∫ : 1 ∫½ : 1 -½ᶻ : 1 -ᶻ¿ : 1 -¿‼ : 1 +½ḟ : 1 uᵐ : 1 -ᵐh : 1 hů : 1 ƒy : 1 y1 : 1 @@ -514,7 +517,6 @@ z¿ : 1 $N : 1 Ř↔ : 1 {Z : 1 -Z: : 1 $3 : 1 ç- : 1 -P : 1 @@ -603,7 +605,6 @@ j1 : 1 1? : 1 ?- : 1 O: : 1 -:ᵐ : 1 ≡$ : 1 $Ð : 1 Ðå : 1 @@ -776,7 +777,6 @@ XÞ : 1 ≡ĭ : 1 }Å : 1 Ɗĭ : 1 -*+ : 1 $/ : 1 /1 : 1 %≡ : 1 @@ -1060,7 +1060,6 @@ dÐ : 1 "- : 1 _" : 1 "Ň : 1 -ŧĉ : 1 ĉᵗ : 1 z' : 1 '= : 1 @@ -1285,7 +1284,6 @@ q= : 1 s= : 1 řJ : 1 Jĉ : 1 -ᵐz : 1 ≈đ : 1 đG : 1 G← : 1 @@ -1293,3 +1291,21 @@ G← : 1 Jt : 1 tđ : 1 đ= : 1 +ᵋ* : 1 ++- : 1 +-Ď : 1 +Ď~ : 1 +~2 : 1 +2> : 1 +RJ : 1 +J: : 1 +hm : 1 +mj : 1 +j↕ : 1 +ũh : 1 +h= : 1 +:Ť : 1 +Ť‼ : 1 +‼Ť : 1 +Ť$ : 1 +$ḟ : 1 diff --git a/analysis/freq_3gram.txt b/analysis/freq_3gram.txt index bded081..0651c04 100644 --- a/analysis/freq_3gram.txt +++ b/analysis/freq_3gram.txt @@ -41,6 +41,7 @@ x:ᵒ : 2 #ᵑ{ : 2 ∆±ĉ : 2 ←ᶠ{ : 2 +ĉᵐz : 2 ĝ," : 1 ,"ᵉ : 1 1:ᶦ : 1 @@ -242,9 +243,7 @@ oᶜ↔ : 1 ĭZĬ : 1 ZĬ‼ : 1 ¬∫½ : 1 -∫½ᶻ : 1 -½ᶻ¿ : 1 -ᶻ¿‼ : 1 +∫½ḟ : 1 uᵐh : 1 ᵐhů : 1 ƒy1 : 1 @@ -1269,10 +1268,30 @@ q=} : 1 }s= : 1 řJĉ : 1 Jĉᵐ : 1 -ĉᵐz : 1 ≈đG : 1 đG← : 1 ʷ{Ƶ : 1 {Ƶþ : 1 Jtđ : 1 tđ= : 1 +ᵋ*+ : 1 +*+- : 1 ++-Ď : 1 +-Ď~ : 1 +Ď~2 : 1 +~2> : 1 +RJ: : 1 +J:ᵐ : 1 +:ᵐh : 1 +ᵐhm : 1 +hmj : 1 +mj↕ : 1 +j↕ũ : 1 +↕ũh : 1 +ũh= : 1 +Z:Ť : 1 +:Ť‼ : 1 +Ť‼Ť : 1 +‼Ť$ : 1 +Ť$ḟ : 1 +ŧĉᵐ : 1 diff --git a/analysis/freq_4gram.txt b/analysis/freq_4gram.txt index 5be652f..2bc990f 100644 --- a/analysis/freq_4gram.txt +++ b/analysis/freq_4gram.txt @@ -164,9 +164,7 @@ o;↔ᶻ : 1 oᶜ↔= : 1 ᵑᵉř^ : 1 ĭZĬ‼ : 1 -¬∫½ᶻ : 1 -∫½ᶻ¿ : 1 -½ᶻ¿‼ : 1 +¬∫½ḟ : 1 uᵐhů : 1 ƒy1| : 1 y1|∏ : 1 @@ -1029,3 +1027,21 @@ Jĉᵐz : 1 ≈đG← : 1 ʷ{Ƶþ : 1 Jtđ= : 1 +ᵋ*+- : 1 +*+-Ď : 1 ++-Ď~ : 1 +-Ď~2 : 1 +Ď~2> : 1 +RJ:ᵐ : 1 +J:ᵐh : 1 +:ᵐhm : 1 +ᵐhmj : 1 +hmj↕ : 1 +mj↕ũ : 1 +j↕ũh : 1 +↕ũh= : 1 +Z:Ť‼ : 1 +:Ť‼Ť : 1 +Ť‼Ť$ : 1 +‼Ť$ḟ : 1 +ŧĉᵐz : 1 diff --git a/analysis/freq_5gram.txt b/analysis/freq_5gram.txt index cefafb4..9ad7668 100644 --- a/analysis/freq_5gram.txt +++ b/analysis/freq_5gram.txt @@ -111,8 +111,6 @@ rF:E∑ : 1 o;↔ᶻÐ : 1 ;↔ᶻÐl : 1 ↔ᶻÐlµ : 1 -¬∫½ᶻ¿ : 1 -∫½ᶻ¿‼ : 1 ƒy1|∏ : 1 Ṁä7+≥ : 1 *5*4ŋ : 1 @@ -802,3 +800,17 @@ $ᵗ{iq : 1 iq=}s : 1 q=}s= : 1 řJĉᵐz : 1 +ᵋ*+-Ď : 1 +*+-Ď~ : 1 ++-Ď~2 : 1 +-Ď~2> : 1 +RJ:ᵐh : 1 +J:ᵐhm : 1 +:ᵐhmj : 1 +ᵐhmj↕ : 1 +hmj↕ũ : 1 +mj↕ũh : 1 +j↕ũh= : 1 +Z:Ť‼Ť : 1 +:Ť‼Ť$ : 1 +Ť‼Ť$ḟ : 1 diff --git a/analysis/particles.txt b/analysis/particles.txt index 03fd875..532a1f7 100644 --- a/analysis/particles.txt +++ b/analysis/particles.txt @@ -2,16 +2,16 @@ particle : with "{" / total ᵈ : 0 / 7 ʳ : 0 / 5 ˣ : 0 / 4 -ᶻ : 0 / 11 +ᶻ : 0 / 10 ᶾ : 0 / 1 ᵉ : 1 / 20 ᶜ : 1 / 9 -ᵐ : 5 / 36 +ᵐ : 5 / 38 ᵚ : 1 / 7 ᵃ : 2 / 10 +ᵋ : 1 / 5 ᵗ : 2 / 10 ᵒ : 4 / 18 -ᵋ : 1 / 4 ᵑ : 7 / 12 ᵖ : 9 / 15 ᵏ : 4 / 6 diff --git a/doc/Builtins.md b/doc/Builtins.md index 7ef98dd..dc3645b 100644 --- a/doc/Builtins.md +++ b/doc/Builtins.md @@ -1220,6 +1220,14 @@ Check if an element is in a list. If it is, push the element, otherwise fail. +### `filterBy` (`ḟ`, `2 -> 1`) + +Filter a list by whether the corresponding element in another list is not failed. + +If the first list also contains failed items, those items are also removed. + +Fail when the two lists are of different lengths. + ## Particles ### `onBoth` (`ᵃ`, `(0 -> n) -> (0 -> 2 * n) or (m -> n) -> (m + 1 -> 2 * n) where m > 0`) diff --git a/doc/CodePage.md b/doc/CodePage.md index e0f2320..7b99f17 100644 --- a/doc/CodePage.md +++ b/doc/CodePage.md @@ -19,7 +19,7 @@ The language is still in an early stage, so the code page is incomplete. Unassig |**A_**|`Ä`|`Å`|`Ƃ`|`Ç`|`Ĉ`|`Ď`|`Ð`|`Ɗ`|`Ë`|`Ḟ`|`Ĝ`|`Ģ`|`Ħ`|`Ĩ`|`Ĭ`|`Ļ`| |**B_**|`Ṁ`|`Ṃ`|`Ň`|`Ö`|`Ø`|`Ɔ`|`Ƥ`|`Ṗ`|`Ř`|`Š`|`Ş`|`Ţ`|`Ť`|`Ŭ`|`Ž`|`Ƶ`| |**C_**|`Þ`|`�`|`�`|`�`|`�`|`�`|`�`|`�`|`�`|`�`|`�`|`�`|`�`|`�`|`�`|`�`| -|**D_**|`ä`|`å`|`ƃ`|`ƀ`|`ç`|`ĉ`|`đ`|`ḍ`|`ɗ`|`ē`|`ĕ`|`ƒ`|`ĝ`|`ï`|`ĭ`|`į`| -|**E_**|`ṁ`|`ṃ`|`ɱ`|`ň`|`ŋ`|`ṇ`|`õ`|`ɔ`|`ƥ`|`ŗ`|`ř`|`ş`|`ŧ`|`ũ`|`ů`|`ž`| -|**F_**|`ƶ`|`þ`|`�`|`�`|`�`|`�`|`�`|`�`|`�`|`�`|`�`|`�`|`�`|`�`|`�`|`�`| +|**D_**|`ä`|`å`|`ƃ`|`ƀ`|`ç`|`ĉ`|`đ`|`ḍ`|`ɗ`|`ē`|`ĕ`|`ƒ`|`ḟ`|`ĝ`|`ï`|`ĭ`| +|**E_**|`į`|`ṁ`|`ṃ`|`ɱ`|`ň`|`ŋ`|`ṇ`|`õ`|`ɔ`|`ƥ`|`ŗ`|`ř`|`ş`|`ŧ`|`ũ`|`ů`| +|**F_**|`ž`|`ƶ`|`þ`|`�`|`�`|`�`|`�`|`�`|`�`|`�`|`�`|`�`|`�`|`�`|`�`|`�`| diff --git a/src/Nekomata/Builtin.hs b/src/Nekomata/Builtin.hs index 03e3dad..ab2868e 100644 --- a/src/Nekomata/Builtin.hs +++ b/src/Nekomata/Builtin.hs @@ -1336,6 +1336,15 @@ builtins = elem' "Check if an element is in a list.\n\ \If it is, push the element, otherwise fail." + , Builtin + "filterBy" + 'ḟ' + filterBy + "Filter a list by whether the corresponding element in another list \ + \is not failed.\n\ + \If the first list also contains failed items, \ + \those items are also removed.\n\ + \Fail when the two lists are of different lengths." ] -- | The map from names to builtin functions diff --git a/src/Nekomata/Builtin/List.hs b/src/Nekomata/Builtin/List.hs index 78c915b..e1d7df2 100644 --- a/src/Nekomata/Builtin/List.hs +++ b/src/Nekomata/Builtin/List.hs @@ -829,3 +829,12 @@ elem' = binary elem'' elem_ _ Nil = Fail elem_ x (Cons y ys) = y >>= tryEq x >>= \b -> if b then Val x else ys >>= elem_ x + +filterBy :: Function +filterBy = binary filterBy' + where + filterBy' i (DListT xs) (DListT ys) = liftList2 (filterBy_ i) xs ys + filterBy' _ _ _ = Fail + filterBy_ i xs ys = + zipWithFail (\_ x y -> normalForm (Val y) >> Val x) i xs ys + >>= filterTry diff --git a/src/Nekomata/CodePage.hs b/src/Nekomata/CodePage.hs index c9600db..1b58bef 100644 --- a/src/Nekomata/CodePage.hs +++ b/src/Nekomata/CodePage.hs @@ -22,9 +22,9 @@ codePage = ++ "ÄÅƂÇĈĎÐƊËḞĜĢĦĨĬĻ" ++ "ṀṂŇÖØƆƤṖŘŠŞŢŤŬŽƵ" ++ "Þ���������������" - ++ "äåƃƀçĉđḍɗēĕƒĝïĭį" - ++ "ṁṃɱňŋṇõɔƥŗřşŧũůž" - ++ "ƶþ��������������" + ++ "äåƃƀçĉđḍɗēĕƒḟĝïĭ" + ++ "įṁṃɱňŋṇõɔƥŗřşŧũů" + ++ "žƶþ�������������" -- | Convert a character to a number. charToInt :: (Num a) => Char -> Maybe a diff --git a/test/Eval.hs b/test/Eval.hs index 654344a..2894cc7 100644 --- a/test/Eval.hs +++ b/test/Eval.hs @@ -871,7 +871,7 @@ testEval = describe "Evaluation" $ do , ("[1,1,1,0,0,0,0,1,1,1,1,0,0,1,0,0,1,1,0,0,1,1,1,1,0,0,1,0,0]", all_ ["[1,1,1,0,0,1,1,1,1,0,1,0,1,1,0,1,1,1,1,0,1,0]"]) ] specEval - "¬∫½ᶻ¿‼" + "¬∫½ḟ" [ ("[1,0,0,1,0,0,1]", all_ ["[1,0,1,0,1]"]) , ("[1,1,0,0,1,1,0,0,1]", all_ ["[1,1,0,1,1,0,1]"]) , ("[1,1,0,0,1,1,1,0,0,1,1]", all_ ["[1,1,0,1,1,1,0,1,1]"]) @@ -3419,4 +3419,48 @@ testEval = describe "Evaluation" $ do , ("\"FALSYTESTCASESXFALSYTESTCASES\"", Check False) , ("\"FALSYTESTCASESFALSYTESTCASES\"", Check False) , ("\"SMARTIEATIE\"", Check False) + ] + describe "q269712: Modular Equivalence" $ do + specEval + "ᵋ*+-Ď~2>" + [ ("3 4", all_ ["5"]) + , ("5 8", all_ ["3", "9", "27"]) + , ("29 9", all_ ["223"]) + , ("26 4", all_ ["37", "74"]) + , ("13 11", all_ ["7", "17", "119"]) + , ("6258 571", all_ ["463", "7703", "3566489"]) + ] + describe "q269857: Counting rankings" $ do + specEval + "RJ:ᵐhmj↕ũh=" + [ ("1 1", Count 1) + , ("2 1", Count 2) + , ("2 2", Count 1) + , ("3 1", Count 6) + , ("3 2", Count 4) + , ("3 3", Count 3) + , ("4 1", Count 26) + , ("4 2", Count 18) + , ("4 3", Count 18) + , ("4 4", Count 13) + ] + describe "q269954: Remove falsy rows and columns" $ do + specEval + "Z:Ť‼Ť$ḟ" + [ ("[[1,2,3],[4,5,6]]", all_ ["[[1,2,3],[4,5,6]]"]) + , ("[[1,2,3],[4,5,0]]", all_ ["[[1,2]]"]) + , ("[[3,6,19],[4,0,18],[2,19,3]]", all_ ["[[3,19],[2,3]]"]) + , ("[[5,3,2,4,1],[3,2,0,4,7],[7,1,9,8,2],[3,2,1,5,7],[6,4,6,1,2],[9,3,2,4,0]]", all_ ["[[5,3,4],[7,1,8],[3,2,5],[6,4,1]]"]) + , ("[[4,9,4,1],[2,0,6,0],[3,4,1,2],[9,7,8,5],[3,5,2,0]]", all_ ["[[4,4],[3,1],[9,8]]"]) + ] + describe "q270154: Strings without twin letters" $ do + specEval + "ŧĉᵐz" + [ ("3 \"ABC\"", all_ ["ABA", "ABC", "ACA", "ACB", "BAB", "BAC", "BCA", "BCB", "CAB", "CAC", "CBA", "CBC"]) + , ("3 \"AB\"", all_ ["ABA", "BAB"]) + , ("3 \"ABCD\"", truncate_ ["ABA", "ABC", "ABD", "ACA", "ACB", "ACD", "ADA", "ADB", "ADC", "BAB"]) + , ("2 \"OKAY\"", all_ ["OK", "OA", "OY", "KO", "KA", "KY", "AO", "AK", "AY", "YO", "YK", "YA"]) + , ("3 \"CODEGLF\"", truncate_ ["COC", "COD", "COE", "COG", "COL", "COF", "CDC", "CDO", "CDE", "CDG"]) + , ("4 \"NFKD\"", truncate_ ["NFNF", "NFNK", "NFND", "NFKN", "NFKF", "NFKD", "NFDN", "NFDF", "NFDK", "NKNF"]) + , ("5 \"JOHN\"", truncate_ ["JOJOJ", "JOJOH", "JOJON", "JOJHJ", "JOJHO", "JOJHN", "JOJNJ", "JOJNO", "JOJNH", "JOHJO"]) ] \ No newline at end of file