diff --git a/CHANGELOG.md b/CHANGELOG.md index 616b628..15b8e2b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,7 +2,7 @@ ## 0.5.2.0 -- Unreleased -* Updated some dependencies. +* Updated some dependencies. Now Nekomata can be built with GHC 9.8.1. * Fixed a bug in printing truncated results. ## 0.5.1.0 -- 2023-09-27 diff --git a/analysis/Ideas.md b/analysis/Ideas.md index ed17717..260a9fe 100644 --- a/analysis/Ideas.md +++ b/analysis/Ideas.md @@ -186,6 +186,14 @@ LiberationMono 字体所支持的字符列举于[此文件](analysis/LiberationM 等以后的版本再考虑这些问题。 +## 关于助词 + +根据目前的统计结果,两个字符的组合中排前几名的都是助词 + `{` 的形式。也许可以像 Vyxal 等语言一样,让这些助词自动开启 block,省去一个 `{`。不过另外一些助词通常只修饰单个 built-in,自动开启 block 反而会额外需要一个 `}`。尤其是 `ᵖ`、`ᵑ`、`ᵏ`,两种用法都很常见,不好取舍。详见 [`analysis/particles.txt`](particles.txt)。 + +自动开启 block 是很大的 breaking change,会影响到大量的解答。最好能有一个改动没有这么大的方案。 + +可以考虑如果一个助词出现在程序的结尾,其修饰的就是除它之外的整个程序。比如说 `ᶦ{Ƃ2ŗɔƃ3M` 可以写成 `Ƃ2ŗɔƃ3Mᶦ`。这样解决不了所有的问题,但可以解决一些问题。不过这会降低可读性,而且 parser 也会变得复杂。 + ## 关于 arity 当前,Nekomata 中的助词会检查它修饰的函数的 arity,如果不匹配就报错。这严格限制了函数的使用方式,比如说 `\map` 只能用于 arity 为 `n -> 1` 的函数。而且 arity 本身也有一些不太清晰的地方。 diff --git a/analysis/corpus.txt b/analysis/corpus.txt index 1fc0731..ba73d14 100644 --- a/analysis/corpus.txt +++ b/analysis/corpus.txt @@ -150,6 +150,7 @@ ox= x↕= →4ᵒE∑∆l O3L +J$ᶻL o↔ĭ∑ä R:E∏ ux→=∕$p= @@ -271,3 +272,6 @@ pNᵉ#ĉ#* ←ᶠ{ᵈqEů∑= ←ᶠ{ƵBƶ:o= ˡ{N→v∩ +ʷ∑→ᵉbD +ᶦ{Ƃ2ŗɔƃ3M +ĎSᵉti¦ diff --git a/analysis/freq_1gram.txt b/analysis/freq_1gram.txt index fe4dce8..87a8e0b 100644 --- a/analysis/freq_1gram.txt +++ b/analysis/freq_1gram.txt @@ -1,46 +1,46 @@ -{ : 61 +{ : 62 : : 44 -$ : 43 +$ : 44 = : 36 + : 35 -∑ : 33 +∑ : 34 ← : 28 ᵐ : 28 R : 28 * : 26 -→ : 25 +→ : 26 } : 25 - : 23 a : 22 1 : 21 +ᵉ : 20 ç : 20 j : 20 -ᵉ : 18 , : 18 o : 18 x : 18 ↔ : 18 u : 17 +2 : 17 # : 16 +3 : 16 ᵒ : 16 p : 16 -2 : 16 -3 : 15 l : 15 ~ : 15 ↕ : 14 ĭ : 14 +Ƃ : 14 ᵖ : 14 Ṁ : 14 -Ƃ : 13 ∫ : 13 +t : 13 Ň : 13 Ð : 13 +ᶦ : 12 +S : 12 ½ : 12 -t : 12 -ᶦ : 11 N : 11 -S : 11 Q : 11 ≡ : 11 đ : 11 @@ -51,22 +51,23 @@ Z : 11 _ : 11 " : 10 Ť : 10 +ᶻ : 10 Ɔ : 10 Ë : 10 ; : 10 ∏ : 10 +L : 10 +ʷ : 9 z : 9 Ţ : 9 ᵃ : 9 -ᶻ : 9 ŋ : 9 ? : 9 ᵚ : 9 ᶠ : 9 -L : 9 -ʷ : 8 P : 8 ᶜ : 8 +J : 8 < : 8 ũ : 8 × : 8 @@ -82,25 +83,25 @@ c : 8 ṁ : 8 C : 8 ± : 8 -J : 7 q : 7 ᵗ : 7 ˡ : 7 f : 7 £ : 7 ɗ : 7 +ŗ : 7 Ĉ : 7 Ĩ : 7 4 : 7 ∆ : 7 @ : 7 ᵏ : 6 +ƃ : 6 ů : 6 ∕ : 6 Ä : 6 / : 6 Ø : 6 -ŗ : 6 ∙ : 6 ä : 6 O : 6 @@ -112,10 +113,11 @@ O : 6 Ƶ : 5 y : 5 Ö : 5 -ƃ : 5 d : 5 +Ď : 5 ≤ : 5 Ĭ : 5 +¦ : 5 ş : 5 µ : 5 ¿ : 5 @@ -123,20 +125,21 @@ d : 5 √ : 5 5 : 5 ≈ : 5 +i : 5 B : 5 +b : 5 I : 4 H : 4 -Ď : 4 Ç : 4 ŧ : 4 ʳ : 4 G : 4 -¦ : 4 k : 4 F : 4 ƥ : 4 +ɔ : 4 +M : 4 h : 4 -i : 4 ÷ : 4 Þ : 4 ˣ : 4 @@ -144,7 +147,6 @@ i : 4 ň : 4 0 : 4 ᵋ : 4 -b : 4 A : 4 ĝ : 3 Ṃ : 3 @@ -153,9 +155,8 @@ U : 3 Y : 3 T : 3 s : 3 -ɔ : 3 Ħ : 3 -M : 3 +D : 3 7 : 3 > : 3 ƶ : 3 @@ -167,7 +168,6 @@ v : 3 § : 3 Ƥ : 2 g : 2 -D : 2 X : 2 K : 2 6 : 2 diff --git a/analysis/freq_2gram.txt b/analysis/freq_2gram.txt index 9e6a250..8bc22f2 100644 --- a/analysis/freq_2gram.txt +++ b/analysis/freq_2gram.txt @@ -1,4 +1,4 @@ -ᶦ{ : 10 +ᶦ{ : 11 ᵖ{ : 8 ʷ{ : 7 ᵑ{ : 7 @@ -147,6 +147,7 @@ _= : 2 aṁ : 2 0* : 2 x= : 2 +$ᶻ : 2 o↔ : 2 ĭ∑ : 2 ux : 2 @@ -178,6 +179,7 @@ x: : 2 }- : 2 $B : 2 $L : 2 +→ᵉ : 2 RS : 2 += : 2 3~ : 2 @@ -556,6 +558,8 @@ x↕ : 1 ∆l : 1 O3 : 1 3L : 1 +J$ : 1 +ᶻL : 1 ↔ĭ : 1 ∑ä : 1 E∏ : 1 @@ -651,7 +655,6 @@ D: : 1 m@ : 1 Øc : 1 c; : 1 -$ᶻ : 1 Ťx : 1 xᶻ : 1 ᶻŘ : 1 @@ -752,7 +755,6 @@ a* : 1 $h : 1 h→ : 1 →L : 1 -→ᵉ : 1 ᵉ_ : 1 _r : 1 rÇ : 1 @@ -1142,3 +1144,19 @@ o= : 1 N→ : 1 →v : 1 v∩ : 1 +ʷ∑ : 1 +∑→ : 1 +ᵉb : 1 +bD : 1 +{Ƃ : 1 +Ƃ2 : 1 +2ŗ : 1 +ŗɔ : 1 +ɔƃ : 1 +ƃ3 : 1 +3M : 1 +ĎS : 1 +Sᵉ : 1 +ᵉt : 1 +ti : 1 +i¦ : 1 diff --git a/analysis/freq_3gram.txt b/analysis/freq_3gram.txt index 14431ee..249ae75 100644 --- a/analysis/freq_3gram.txt +++ b/analysis/freq_3gram.txt @@ -421,6 +421,8 @@ x↕= : 1 E∑∆ : 1 ∑∆l : 1 O3L : 1 +J$ᶻ : 1 +$ᶻL : 1 o↔ĭ : 1 ↔ĭ∑ : 1 ĭ∑ä : 1 @@ -1120,3 +1122,18 @@ Bƶ: : 1 {N→ : 1 N→v : 1 →v∩ : 1 +ʷ∑→ : 1 +∑→ᵉ : 1 +→ᵉb : 1 +ᵉbD : 1 +ᶦ{Ƃ : 1 +{Ƃ2 : 1 +Ƃ2ŗ : 1 +2ŗɔ : 1 +ŗɔƃ : 1 +ɔƃ3 : 1 +ƃ3M : 1 +ĎSᵉ : 1 +Sᵉt : 1 +ᵉti : 1 +ti¦ : 1 diff --git a/analysis/freq_4gram.txt b/analysis/freq_4gram.txt index e685d2e..206406f 100644 --- a/analysis/freq_4gram.txt +++ b/analysis/freq_4gram.txt @@ -293,6 +293,7 @@ R+ŋ↕ : 1 4ᵒE∑ : 1 ᵒE∑∆ : 1 E∑∆l : 1 +J$ᶻL : 1 o↔ĭ∑ : 1 ↔ĭ∑ä : 1 R:E∏ : 1 @@ -909,3 +910,15 @@ Bƶ:o : 1 ˡ{N→ : 1 {N→v : 1 N→v∩ : 1 +ʷ∑→ᵉ : 1 +∑→ᵉb : 1 +→ᵉbD : 1 +ᶦ{Ƃ2 : 1 +{Ƃ2ŗ : 1 +Ƃ2ŗɔ : 1 +2ŗɔƃ : 1 +ŗɔƃ3 : 1 +ɔƃ3M : 1 +ĎSᵉt : 1 +Sᵉti : 1 +ᵉti¦ : 1 diff --git a/analysis/freq_5gram.txt b/analysis/freq_5gram.txt index e37b8ab..b1e2ee3 100644 --- a/analysis/freq_5gram.txt +++ b/analysis/freq_5gram.txt @@ -714,3 +714,12 @@ qEů∑= : 1 Bƶ:o= : 1 ˡ{N→v : 1 {N→v∩ : 1 +ʷ∑→ᵉb : 1 +∑→ᵉbD : 1 +ᶦ{Ƃ2ŗ : 1 +{Ƃ2ŗɔ : 1 +Ƃ2ŗɔƃ : 1 +2ŗɔƃ3 : 1 +ŗɔƃ3M : 1 +ĎSᵉti : 1 +Sᵉti¦ : 1 diff --git a/analysis/particles.txt b/analysis/particles.txt index 0935125..f5bc0e5 100644 --- a/analysis/particles.txt +++ b/analysis/particles.txt @@ -3,9 +3,9 @@ particle : with "{" / total ʳ : 0 / 4 ᵗ : 0 / 7 ˣ : 0 / 4 -ᶻ : 0 / 9 +ᶻ : 0 / 10 ᶾ : 0 / 1 -ᵉ : 1 / 18 +ᵉ : 1 / 20 ᵐ : 3 / 28 ᵚ : 1 / 9 ᶜ : 1 / 8 @@ -16,6 +16,6 @@ particle : with "{" / total ᵑ : 7 / 11 ᵏ : 4 / 6 ᶠ : 7 / 9 +ʷ : 7 / 9 ˡ : 6 / 7 -ʷ : 7 / 8 -ᶦ : 10 / 11 +ᶦ : 11 / 12 diff --git a/test/Eval.hs b/test/Eval.hs index 01863d0..68a1f24 100644 --- a/test/Eval.hs +++ b/test/Eval.hs @@ -27,16 +27,22 @@ specEval code testCases = context code $ do Count n -> countResults result `shouldBe` n Check b -> checkResult result `shouldBe` b +all_ :: [String] -> Result +all_ = All False + +truncate_ :: [String] -> Result +truncate_ = All True + testEval :: Spec testEval = describe "Evaluation" $ do describe "q69: Golf you a quine for great good!" $ do specEval "\"ᵉĝ,\"ᵉĝ," - [("", All False ["\"ᵉĝ,\"ᵉĝ,"])] + [("", all_ ["\"ᵉĝ,\"ᵉĝ,"])] describe "q85: Fibonacci function or sequence" $ do specEval "1:ᶦ{$ᵉ+" - [("", All True ["1", "1", "2", "3", "5", "8", "13", "21", "34", "55"])] + [("", truncate_ ["1", "1", "2", "3", "5", "8", "13", "21", "34", "55"])] specEval "ʷ{←Pᶜ←" [ ("0", Count 1) @@ -66,8 +72,8 @@ testEval = describe "Evaluation" $ do describe "q183: Finding \"sub-palindromes\"." $ do specEval "qNᵗzƀ=ũ" - [ ("\"12131331\"", All False ["121", "131", "313", "1331", "33"]) - , ("\"3333\"", All False ["33", "333", "3333"]) + [ ("\"12131331\"", all_ ["121", "131", "313", "1331", "33"]) + , ("\"3333\"", all_ ["33", "333", "3333"]) ] describe "q1294: Determine whether strings are anagrams" $ do specEval @@ -94,52 +100,52 @@ testEval = describe "Evaluation" $ do describe "q12177: Collatz Conjecture (OEIS A006577)" $ do specEval "ˡ{Ƶᵉ½3*→I" - [ ("2", All False ["1"]) - , ("16", All False ["4"]) - , ("5", All False ["5"]) - , ("7", All False ["16"]) + [ ("2", all_ ["1"]) + , ("16", all_ ["4"]) + , ("5", all_ ["5"]) + , ("7", all_ ["16"]) ] describe "q12902: Run Length Decoding" $ do specEval "ĭᵐĜy" - [("\":144,1'1\"", All False [":4444,'"])] + [("\":144,1'1\"", all_ [":4444,'"])] describe "q38325: Minimum excluded number" $ do specEval "ᵏf" - [ ("[1]", All False ["0"]) - , ("[0]", All False ["1"]) - , ("[2,0]", All False ["1"]) - , ("[3,1,0,1,3,3]", All False ["2"]) - , ("[]", All False ["0"]) - , ("[1,2,3]", All False ["0"]) - , ("[5,4,1,5,4,8,2,1,5,4,0,7,7]", All False ["3"]) - , ("[3,2,1,0]", All False ["4"]) - , ("[0,0,1,1,2,2,3]", All False ["4"]) - , ("[1,0,7,6,3,11,15,1,9,2,3,1,5,2,3,4,6,8,1,18]", All False ["10"]) + [ ("[1]", all_ ["0"]) + , ("[0]", all_ ["1"]) + , ("[2,0]", all_ ["1"]) + , ("[3,1,0,1,3,3]", all_ ["2"]) + , ("[]", all_ ["0"]) + , ("[1,2,3]", all_ ["0"]) + , ("[5,4,1,5,4,8,2,1,5,4,0,7,7]", all_ ["3"]) + , ("[3,2,1,0]", all_ ["4"]) + , ("[0,0,1,1,2,2,3]", all_ ["4"]) + , ("[1,0,7,6,3,11,15,1,9,2,3,1,5,2,3,4,6,8,1,18]", all_ ["10"]) ] describe "q42529: Mode (most common element) of a list" $ do specEval "ŢṂ" - [("[4,3,1,0,6,1,6,4,4,0,3,1,7,7,3,4,1,1,2,8]", All False ["1"])] + [("[4,3,1,0,6,1,6,4,4,0,3,1,7,7,3,4,1,1,2,8]", all_ ["1"])] describe "q50020: List Sophie Germain primes" $ do specEval "Ƥ←½Q" - [("", All True ["2", "3", "5", "11", "23", "29", "41", "53", "83", "89"])] + [("", truncate_ ["2", "3", "5", "11", "23", "29", "41", "53", "83", "89"])] describe "q50240: XOR multiplication" $ do specEval "ᵃƂ×Öƃ" - [ ("0 1", All False ["0"]) - , ("1 2", All False ["2"]) - , ("9 0", All False ["0"]) - , ("6 1", All False ["6"]) - , ("3 3", All False ["5"]) - , ("2 5", All False ["10"]) - , ("7 9", All False ["63"]) - , ("13 11", All False ["127"]) - , ("5 17", All False ["85"]) - , ("14 13", All False ["70"]) - , ("19 1", All False ["19"]) - , ("63 63", All False ["1365"]) + [ ("0 1", all_ ["0"]) + , ("1 2", all_ ["2"]) + , ("9 0", all_ ["0"]) + , ("6 1", all_ ["6"]) + , ("3 3", all_ ["5"]) + , ("2 5", all_ ["10"]) + , ("7 9", all_ ["63"]) + , ("13 11", all_ ["127"]) + , ("5 17", all_ ["85"]) + , ("14 13", all_ ["70"]) + , ("19 1", all_ ["19"]) + , ("63 63", all_ ["1365"]) ] describe "q50472: Check if words are isomorphs" $ do specEval @@ -179,7 +185,7 @@ testEval = describe "Evaluation" $ do describe "q55422: \"Hello, World!\"" $ do specEval "\"Hello, World!\"" - [("", All False ["Hello, World!"])] + [("", all_ ["Hello, World!"])] describe "q57617: Is this number a prime?" $ do specEval "Q" @@ -208,34 +214,34 @@ testEval = describe "Evaluation" $ do describe "q60610: Non-Unique/Duplicate Elements" $ do specEval "u∕u" - [ ("[]", All False ["[]"]) - , ("[-1,0,1]", All False ["[]"]) - , ("[1,1]", All False ["[1]"]) - , ("[3,0,0,1,1,0,5,3]", All False ["[0,1,3]"]) - , ("[-34,0,1,-34,4,8,4]", All False ["[-34,4]"]) + [ ("[]", all_ ["[]"]) + , ("[-1,0,1]", all_ ["[]"]) + , ("[1,1]", all_ ["[1]"]) + , ("[3,0,0,1,1,0,5,3]", all_ ["[0,1,3]"]) + , ("[-34,0,1,-34,4,8,4]", all_ ["[-34,4]"]) ] describe "q61808: Lossy Sorting (Implement Dropsort)" $ do specEval "pƆᵖ≤" - [ ("[1,2,5,4,3,7]", All False ["1", "2", "5", "7"]) - , ("[10,-1,12]", All False ["10", "12"]) - , ("[-7,-8,-5,0,-1,1]", All False ["-7", "-5", "0", "1"]) - , ("[9,8,7,6,5]", All False ["9"]) - , ("[10,13,17,21]", All False ["10", "13", "17", "21"]) - , ("[10,10,10,9,10]", All False ["10", "10", "10", "10"]) + [ ("[1,2,5,4,3,7]", all_ ["1", "2", "5", "7"]) + , ("[10,-1,12]", all_ ["10", "12"]) + , ("[-7,-8,-5,0,-1,1]", all_ ["-7", "-5", "0", "1"]) + , ("[9,8,7,6,5]", all_ ["9"]) + , ("[10,13,17,21]", all_ ["10", "13", "17", "21"]) + , ("[10,10,10,9,10]", all_ ["10", "10", "10", "10"]) ] describe "q62732: Implement a Truth-Machine" $ do specEval "ᶦP" - [ ("0", All False ["0"]) - , ("1", All True ["1", "1", "1", "1", "1", "1", "1", "1", "1", "1"]) + [ ("0", all_ ["0"]) + , ("1", truncate_ ["1", "1", "1", "1", "1", "1", "1", "1", "1", "1"]) ] describe "q62752: Longest Common Prefix of 2 Strings" $ do specEval "ᵃp=al" - [ ("\"global\" \"glossary\"", All False ["glo"]) - , ("\"department\" \"depart\"", All False ["depart"]) - , ("\"glove\" \"dove\"", All False ["[]"]) + [ ("\"global\" \"glossary\"", all_ ["glo"]) + , ("\"department\" \"depart\"", all_ ["depart"]) + , ("\"glove\" \"dove\"", all_ ["[]"]) ] describe "q63999: Parenthifiable Binary Numbers" $ do specEval @@ -261,26 +267,26 @@ testEval = describe "Evaluation" $ do describe "q65770: Cover up zeroes in a list" $ do specEval "pZ‼l" - [ ("[1,0,2,0,7,7,7,0,5,0,0,0,9]", All False ["1", "1", "2", "2", "7", "7", "7", "7", "5", "5", "5", "5", "9"]) - , ("[1,0,0,0,0,0]", All False ["1", "1", "1", "1", "1", "1"]) - , ("[-1,0,5,0,0,-7]", All False ["-1", "-1", "5", "5", "5", "-7"]) - , ("[23,0,0,-42,0,0,0]", All False ["23", "23", "23", "-42", "-42", "-42", "-42"]) - , ("[1,2,3,4]", All False ["1", "2", "3", "4"]) - , ("[-1234]", All False ["-1234"]) + [ ("[1,0,2,0,7,7,7,0,5,0,0,0,9]", all_ ["1", "1", "2", "2", "7", "7", "7", "7", "5", "5", "5", "5", "9"]) + , ("[1,0,0,0,0,0]", all_ ["1", "1", "1", "1", "1", "1"]) + , ("[-1,0,5,0,0,-7]", all_ ["-1", "-1", "5", "5", "5", "-7"]) + , ("[23,0,0,-42,0,0,0]", all_ ["23", "23", "23", "-42", "-42", "-42", "-42"]) + , ("[1,2,3,4]", all_ ["1", "2", "3", "4"]) + , ("[-1234]", all_ ["-1234"]) ] describe "q66127: Catalan Numbers" $ do specEval "Ä$Ç$→/" - [ ("0", All False ["1"]) - , ("1", All False ["1"]) - , ("2", All False ["2"]) - , ("3", All False ["5"]) - , ("4", All False ["14"]) - , ("5", All False ["42"]) - , ("6", All False ["132"]) - , ("7", All False ["429"]) - , ("8", All False ["1430"]) - , ("9", All False ["4862"]) + [ ("0", all_ ["1"]) + , ("1", all_ ["1"]) + , ("2", all_ ["2"]) + , ("3", all_ ["5"]) + , ("4", all_ ["14"]) + , ("5", all_ ["42"]) + , ("6", all_ ["132"]) + , ("7", all_ ["429"]) + , ("8", all_ ["1430"]) + , ("9", all_ ["4862"]) ] specEval "Äřŋ∫çƆž≥" @@ -323,99 +329,99 @@ testEval = describe "Evaluation" $ do describe "q68685: The Rien Number" $ do specEval "RtƊjo1cɗ" - [ ("1", All False ["1"]) - , ("2", All False ["12"]) - , ("3", All False ["123"]) - , ("7", All False ["1234567"]) - , ("9", All False ["123456789"]) - , ("10", All False ["10123456789"]) - , ("15", All False ["101111111223344556789"]) - , ("34", All False ["10001111111111111222222222222223333333334444555666777888999"]) - , ("42", All False ["100001111111111111122222222222222233333333333333444444455556666777788889999"]) + [ ("1", all_ ["1"]) + , ("2", all_ ["12"]) + , ("3", all_ ["123"]) + , ("7", all_ ["1234567"]) + , ("9", all_ ["123456789"]) + , ("10", all_ ["10123456789"]) + , ("15", all_ ["101111111223344556789"]) + , ("34", all_ ["10001111111111111222222222222223333333334444555666777888999"]) + , ("42", all_ ["100001111111111111122222222222222233333333333333444444455556666777788889999"]) ] describe "q70365: Construct the Identity Matrix" $ do specEval "ᵒ-¬" - [ ("1", All False ["[[1]]"]) - , ("2", All False ["[[1,0],[0,1]]"]) - , ("3", All False ["[[1,0,0],[0,1,0],[0,0,1]]"]) - , ("4", All False ["[[1,0,0,0],[0,1,0,0],[0,0,1,0],[0,0,0,1]]"]) + [ ("1", all_ ["[[1]]"]) + , ("2", all_ ["[[1,0],[0,1]]"]) + , ("3", all_ ["[[1,0,0],[0,1,0],[0,0,1]]"]) + , ("4", all_ ["[[1,0,0,0],[0,1,0,0],[0,0,1,0],[0,0,0,1]]"]) ] describe "q70558: Hypercube elements" $ do specEval "→rᵉÇË*" - [ ("0", All False ["[1]"]) - , ("1", All False ["[1,2]"]) - , ("3", All False ["[1,6,12,8]"]) - , ("10", All False ["[1,20,180,960,3360,8064,13440,15360,11520,5120,1024]"]) - , ("12", All False ["[1,24,264,1760,7920,25344,59136,101376,126720,112640,67584,24576,4096]"]) + [ ("0", all_ ["[1]"]) + , ("1", all_ ["[1,2]"]) + , ("3", all_ ["[1,6,12,8]"]) + , ("10", all_ ["[1,20,180,960,3360,8064,13440,15360,11520,5120,1024]"]) + , ("12", all_ ["[1,24,264,1760,7920,25344,59136,101376,126720,112640,67584,24576,4096]"]) ] specEval "2ᵚR1cʳ×" - [ ("0", All False ["1"]) - , ("1", All False ["[1,2]"]) - , ("3", All False ["[1,6,12,8]"]) - , ("10", All False ["[1,20,180,960,3360,8064,13440,15360,11520,5120,1024]"]) - , ("12", All False ["[1,24,264,1760,7920,25344,59136,101376,126720,112640,67584,24576,4096]"]) + [ ("0", all_ ["1"]) + , ("1", all_ ["[1,2]"]) + , ("3", all_ ["[1,6,12,8]"]) + , ("10", all_ ["[1,20,180,960,3360,8064,13440,15360,11520,5120,1024]"]) + , ("12", all_ ["[1,24,264,1760,7920,25344,59136,101376,126720,112640,67584,24576,4096]"]) ] describe "q70837: Say What You See" $ do specEval "1Uᶦ{Y$Ĭ}ɗ" - [("", All True ["1", "11", "21", "1211", "111221", "312211", "13112221", "1113213211", "31131211131221", "13211311123113112211"])] + [("", truncate_ ["1", "11", "21", "1211", "111221", "312211", "13112221", "1113213211", "31131211131221", "13211311123113112211"])] describe "q71833: How even is a number?" $ do specEval "ˡ½" - [ ("14", All False ["1"]) - , ("20", All False ["2"]) - , ("94208", All False ["12"]) - , ("7", All False ["0"]) - , ("-4", All False ["2"]) + [ ("14", all_ ["1"]) + , ("20", all_ ["2"]) + , ("94208", all_ ["12"]) + , ("7", all_ ["0"]) + , ("-4", all_ ["2"]) ] describe "q74273: Output all strings" $ do specEval "Ňŧ" - [("\"ab\"", All True ["[]", "a", "b", "aa", "ab", "ba", "bb", "aaa", "aab", "aba", "abb"])] + [("\"ab\"", truncate_ ["[]", "a", "b", "aa", "ab", "ba", "bb", "aaa", "aab", "aba", "abb"])] describe "q77270: Greatest Common Divisor" $ do specEval "G" - [ ("0 2", All False ["2"]) - , ("6 0", All False ["6"]) - , ("30 42", All False ["6"]) - , ("15 14", All False ["1"]) - , ("7 7", All False ["7"]) - , ("69 25", All False ["1"]) - , ("21 12", All False ["3"]) - , ("169 123", All False ["1"]) - , ("20 142", All False ["2"]) - , ("101 202", All False ["101"]) + [ ("0 2", all_ ["2"]) + , ("6 0", all_ ["6"]) + , ("30 42", all_ ["6"]) + , ("15 14", all_ ["1"]) + , ("7 7", all_ ["7"]) + , ("69 25", all_ ["1"]) + , ("21 12", all_ ["3"]) + , ("169 123", all_ ["1"]) + , ("20 142", all_ ["2"]) + , ("101 202", all_ ["101"]) ] specEval "ʷ{$Zᵉ%" - [ ("0 2", All False ["2"]) - , ("6 0", All False ["6"]) - , ("30 42", All False ["6"]) - , ("15 14", All False ["1"]) - , ("7 7", All False ["7"]) - , ("69 25", All False ["1"]) - , ("21 12", All False ["3"]) - , ("169 123", All False ["1"]) - , ("20 142", All False ["2"]) - , ("101 202", All False ["101"]) + [ ("0 2", all_ ["2"]) + , ("6 0", all_ ["6"]) + , ("30 42", all_ ["6"]) + , ("15 14", all_ ["1"]) + , ("7 7", all_ ["7"]) + , ("69 25", all_ ["1"]) + , ("21 12", all_ ["3"]) + , ("169 123", all_ ["1"]) + , ("20 142", all_ ["2"]) + , ("101 202", all_ ["101"]) ] specEval "ṀRᶠ¦Ṁ" - [ ("[0,2]", All False ["2"]) - , ("[6,0]", All False ["6"]) - , ("[30,42]", All False ["6"]) - , ("[15,14]", All False ["1"]) - , ("[7,7]", All False ["7"]) - , ("[69,25]", All False ["1"]) - , ("[21,12]", All False ["3"]) - , ("[169,123]", All False ["1"]) - , ("[20,142]", All False ["2"]) - , ("[101,202]", All False ["101"]) - ] - describe "q77608: All False together now" $ do + [ ("[0,2]", all_ ["2"]) + , ("[6,0]", all_ ["6"]) + , ("[30,42]", all_ ["6"]) + , ("[15,14]", all_ ["1"]) + , ("[7,7]", all_ ["7"]) + , ("[69,25]", all_ ["1"]) + , ("[21,12]", all_ ["3"]) + , ("[169,123]", all_ ["1"]) + , ("[20,142]", all_ ["2"]) + , ("[101,202]", all_ ["101"]) + ] + describe "q77608: all_ together now" $ do specEval "Y$ů" [ ("[3]", Check True) @@ -432,88 +438,88 @@ testEval = describe "Evaluation" $ do describe "q79037: Smallest groups in an array" $ do specEval "ĉş" - [ ("[1,1,1,2,2,1,1,1,1,2,2,2,1,1,1]", All False ["[2,2]"]) - , ("[3,3,3,4,4,4,4,5,5,4,4,3,3,4,4]", All False ["[5,5]", "[4,4]", "[3,3]", "[4,4]"]) - , ("[1,1,2,2,3,3,4]", All False ["[4]"]) - , ("[1]", All False ["[1]"]) - , ("[1,1,10,10,10,100,100]", All False ["[1,1]", "[100,100]"]) + [ ("[1,1,1,2,2,1,1,1,1,2,2,2,1,1,1]", all_ ["[2,2]"]) + , ("[3,3,3,4,4,4,4,5,5,4,4,3,3,4,4]", all_ ["[5,5]", "[4,4]", "[3,3]", "[4,4]"]) + , ("[1,1,2,2,3,3,4]", all_ ["[4]"]) + , ("[1]", all_ ["[1]"]) + , ("[1,1,10,10,10,100,100]", all_ ["[1,1]", "[100,100]"]) ] describe "q79483: Continued Fraction of a Rational Number" $ do specEval "ᶦ{1%ŗ}k" - [ ("860438", All False ["860438"]) - , ("3245/1000", All False ["3", "4", "12", "4"]) - , ("-42/10", All False ["-5", "1", "4"]) - , ("-1147802/10000", All False ["-115", "4", "1", "1", "4", "1", "1", "5", "1", "1", "4"]) - , ("0/11", All False ["0"]) - , ("1/42", All False ["0", "42"]) - , ("2/7", All False ["0", "3", "2"]) - , ("-18/17056", All False ["-1", "1", "946", "1", "1", "4"]) - , ("-17056/18", All False ["-948", "2", "4"]) + [ ("860438", all_ ["860438"]) + , ("3245/1000", all_ ["3", "4", "12", "4"]) + , ("-42/10", all_ ["-5", "1", "4"]) + , ("-1147802/10000", all_ ["-115", "4", "1", "1", "4", "1", "1", "5", "1", "1", "4"]) + , ("0/11", all_ ["0"]) + , ("1/42", all_ ["0", "42"]) + , ("2/7", all_ ["0", "3", "2"]) + , ("-18/17056", all_ ["-1", "1", "946", "1", "1", "4"]) + , ("-17056/18", all_ ["-948", "2", "4"]) ] describe "q82497: Pseudofactorial" $ do specEval "Rʳg" - [ ("1", All False ["1"]) - , ("2", All False ["2"]) - , ("3", All False ["6"]) - , ("4", All False ["12"]) - , ("5", All False ["60"]) - , ("6", All False ["60"]) - , ("7", All False ["420"]) + [ ("1", all_ ["1"]) + , ("2", all_ ["2"]) + , ("3", all_ ["6"]) + , ("4", all_ ["12"]) + , ("5", all_ ["60"]) + , ("6", all_ ["60"]) + , ("7", all_ ["420"]) ] describe "q82604: Approximation of e" $ do specEval "rFŗ∑" - [ ("1", All False ["1"]) - , ("2", All False ["2"]) - , ("3", All False ["5/2"]) - , ("4", All False ["8/3"]) - , ("5", All False ["65/24"]) - , ("6", All False ["163/60"]) - , ("7", All False ["1957/720"]) - , ("8", All False ["685/252"]) - , ("9", All False ["109601/40320"]) - , ("10", All False ["98641/36288"]) + [ ("1", all_ ["1"]) + , ("2", all_ ["2"]) + , ("3", all_ ["5/2"]) + , ("4", all_ ["8/3"]) + , ("5", all_ ["65/24"]) + , ("6", all_ ["163/60"]) + , ("7", all_ ["1957/720"]) + , ("8", all_ ["685/252"]) + , ("9", all_ ["109601/40320"]) + , ("10", all_ ["98641/36288"]) ] describe "q83377: Write a program to elasticize strings" $ do specEval "#Ry" - [ ("\"Why\"", All False ["Whhyyy"]) - , ("\"SKype\"", All False ["SKKyyyppppeeeee"]) - , ("\"LobbY\"", All False ["LoobbbbbbbYYYYY"]) - , ("\"A and B\"", All False ["A aaannnnddddd BBBBBBB"]) + [ ("\"Why\"", all_ ["Whhyyy"]) + , ("\"SKype\"", all_ ["SKKyyyppppeeeee"]) + , ("\"LobbY\"", all_ ["LoobbbbbbbYYYYY"]) + , ("\"A and B\"", all_ ["A aaannnnddddd BBBBBBB"]) ] describe "q83533: Calculate Euler's totient function" $ do specEval "RG1Ĉ" - [ ("1", All False ["1"]) - , ("2", All False ["1"]) - , ("3", All False ["2"]) - , ("8", All False ["4"]) - , ("9", All False ["6"]) - , ("26", All False ["12"]) - , ("44", All False ["20"]) - , ("105", All False ["48"]) + [ ("1", all_ ["1"]) + , ("2", all_ ["1"]) + , ("3", all_ ["2"]) + , ("8", all_ ["4"]) + , ("9", all_ ["6"]) + , ("26", all_ ["12"]) + , ("44", all_ ["20"]) + , ("105", all_ ["48"]) ] describe "q84519: Implement Takewhile" $ do specEval "Ö∫¬∑T" - [ ("[14,42,2324,97090,4080622,171480372]", All False ["[14,42,2324,97090,4080622,171480372]"]) - , ("[42,14,42,2324]", All False ["[42,14,42,2324]"]) - , ("[7,14,42]", All False ["[]"]) - , ("[]", All False ["[]"]) - , ("[171480372,13,14,42]", All False ["[171480372]"]) - , ("[42,14,42,43,41,4080622,171480372]", All False ["[42,14,42]"]) + [ ("[14,42,2324,97090,4080622,171480372]", all_ ["[14,42,2324,97090,4080622,171480372]"]) + , ("[42,14,42,2324]", all_ ["[42,14,42,2324]"]) + , ("[7,14,42]", all_ ["[]"]) + , ("[]", all_ ["[]"]) + , ("[171480372,13,14,42]", all_ ["[171480372]"]) + , ("[42,14,42,43,41,4080622,171480372]", all_ ["[42,14,42]"]) ] specEval "pᵖ½al" - [ ("[14,42,2324,97090,4080622,171480372]", All False ["[14,42,2324,97090,4080622,171480372]"]) - , ("[42,14,42,2324]", All False ["[42,14,42,2324]"]) - , ("[7,14,42]", All False ["[]"]) - , ("[]", All False ["[]"]) - , ("[171480372,13,14,42]", All False ["[171480372]"]) - , ("[42,14,42,43,41,4080622,171480372]", All False ["[42,14,42]"]) + [ ("[14,42,2324,97090,4080622,171480372]", all_ ["[14,42,2324,97090,4080622,171480372]"]) + , ("[42,14,42,2324]", all_ ["[42,14,42,2324]"]) + , ("[7,14,42]", all_ ["[]"]) + , ("[]", all_ ["[]"]) + , ("[171480372,13,14,42]", all_ ["[171480372]"]) + , ("[42,14,42,43,41,4080622,171480372]", all_ ["[42,14,42]"]) ] describe "q84673: Is it a sum-free set?" $ do specEval @@ -545,44 +551,44 @@ testEval = describe "Evaluation" $ do describe "q91154: Sylvester's sequence" $ do specEval "2ᶦ{:←*→" - [("", All True ["2", "3", "7", "43", "1807", "3263443", "10650056950807"])] + [("", truncate_ ["2", "3", "7", "43", "1807", "3263443", "10650056950807"])] describe "q91420: Excessive Integers" $ do specEval "ƒ←∑" - [ ("1", All False ["0"]) - , ("2", All False ["0"]) - , ("3", All False ["0"]) - , ("4", All False ["1"]) - , ("5", All False ["0"]) - , ("6", All False ["0"]) - , ("7", All False ["0"]) - , ("8", All False ["2"]) - , ("9", All False ["1"]) - , ("10", All False ["0"]) - , ("11", All False ["0"]) - , ("12", All False ["1"]) - , ("13", All False ["0"]) - , ("14", All False ["0"]) - , ("15", All False ["0"]) + [ ("1", all_ ["0"]) + , ("2", all_ ["0"]) + , ("3", all_ ["0"]) + , ("4", all_ ["1"]) + , ("5", all_ ["0"]) + , ("6", all_ ["0"]) + , ("7", all_ ["0"]) + , ("8", all_ ["2"]) + , ("9", all_ ["1"]) + , ("10", all_ ["0"]) + , ("11", all_ ["0"]) + , ("12", all_ ["1"]) + , ("13", all_ ["0"]) + , ("14", all_ ["0"]) + , ("15", all_ ["0"]) ] describe "q93261: StringgnirtSStringgnirtSStringgnirtS" $ do specEval "xᵐᵑ↔j" - [ ("\"a\"", All False ["a"]) - , ("\"abcd\"", All False ["abcddcbaabcddcba"]) - , ("\"OK!\"", All False ["OK!!KOOK!"]) - , ("\"4815162342\"", All False ["4815162342243261518448151623422432615184481516234224326151844815162342243261518448151623422432615184"]) - , ("\"PPCG\"", All False ["PPCGGCPPPPCGGCPP"]) - , ("\"42\"", All False ["4224"]) + [ ("\"a\"", all_ ["a"]) + , ("\"abcd\"", all_ ["abcddcbaabcddcba"]) + , ("\"OK!\"", all_ ["OK!!KOOK!"]) + , ("\"4815162342\"", all_ ["4815162342243261518448151623422432615184481516234224326151844815162342243261518448151623422432615184"]) + , ("\"PPCG\"", all_ ["PPCGGCPPPPCGGCPP"]) + , ("\"42\"", all_ ["4224"]) ] describe "q94028: Find the largest number that's adjacent to a zero" $ do specEval "qᵗZđ+aṀ" - [ ("[1,4,3,6,0,3,7,0]", All False ["7"]) - , ("[9,4,9,0,9,0,9,15,-2]", All False ["9"]) - , ("[-4,-6,-2,0,-9]", All False ["-2"]) - , ("[-11,0,0,0,0,0,-12,10]", All False ["0"]) - , ("[0,20]", All False ["20"]) + [ ("[1,4,3,6,0,3,7,0]", all_ ["7"]) + , ("[9,4,9,0,9,0,9,15,-2]", all_ ["9"]) + , ("[-4,-6,-2,0,-9]", all_ ["-2"]) + , ("[-11,0,0,0,0,0,-12,10]", all_ ["0"]) + , ("[0,20]", all_ ["20"]) ] describe "q94291: Is it a balanced number?" $ do specEval @@ -620,15 +626,15 @@ testEval = describe "Evaluation" $ do describe "q94348: Prime counting function" $ do specEval "ƥ" - [ ("1", All False ["0"]) - , ("2", All False ["1"]) - , ("5", All False ["3"]) + [ ("1", all_ ["0"]) + , ("2", all_ ["1"]) + , ("5", all_ ["3"]) ] specEval "Fƒ#" - [ ("1", All False ["0"]) - , ("2", All False ["1"]) - , ("5", All False ["3"]) + [ ("1", all_ ["0"]) + , ("2", all_ ["1"]) + , ("5", all_ ["3"]) ] specEval "R~Q" @@ -639,28 +645,28 @@ testEval = describe "Evaluation" $ do describe "q94999: Least Common Multiple" $ do specEval "ʳg" - [ ("[7,2]", All False ["14"]) - , ("[8,1]", All False ["8"]) - , ("[6,4,8]", All False ["24"]) - , ("[8,2,1,10]", All False ["40"]) - , ("[9,6,2,1,5]", All False ["90"]) - , ("[5,5,7,1,1]", All False ["35"]) - , ("[4,13,8,8,11,1]", All False ["1144"]) - , ("[7,2,2,11,11,8,5]", All False ["3080"]) - , ("[1,6,10,3,4,10,7]", All False ["420"]) - , ("[5,2,9,10,3,4,4,4,7]", All False ["1260"]) - , ("[9,7,10,9,7,8,5,10,1]", All False ["2520"]) + [ ("[7,2]", all_ ["14"]) + , ("[8,1]", all_ ["8"]) + , ("[6,4,8]", all_ ["24"]) + , ("[8,2,1,10]", all_ ["40"]) + , ("[9,6,2,1,5]", all_ ["90"]) + , ("[5,5,7,1,1]", all_ ["35"]) + , ("[4,13,8,8,11,1]", all_ ["1144"]) + , ("[7,2,2,11,11,8,5]", all_ ["3080"]) + , ("[1,6,10,3,4,10,7]", all_ ["420"]) + , ("[5,2,9,10,3,4,4,4,7]", all_ ["1260"]) + , ("[9,7,10,9,7,8,5,10,1]", all_ ["2520"]) ] describe "q95409: 2048-like array shift" $ do specEval "ĉ~ĭ+↔aj" - [ ("[]", All False ["[]"]) - , ("[2,2,4,4]", All False ["[4,8]"]) - , ("[2,2,2,4,4,8]", All False ["[2,4,8,8]"]) - , ("[2,2,2,2]", All False ["[4,4]"]) - , ("[4,4,2,8,8,2]", All False ["[8,2,16,2]"]) - , ("[1024,1024,512,512,256,256]", All False ["[2048,1024,512]"]) - , ("[3,3,3,1,1,7,5,5,5,5]", All False ["[3,6,2,7,10,10]"]) + [ ("[]", all_ ["[]"]) + , ("[2,2,4,4]", all_ ["[4,8]"]) + , ("[2,2,2,4,4,8]", all_ ["[2,4,8,8]"]) + , ("[2,2,2,2]", all_ ["[4,4]"]) + , ("[4,4,2,8,8,2]", all_ ["[8,2,16,2]"]) + , ("[1024,1024,512,512,256,256]", all_ ["[2048,1024,512]"]) + , ("[3,3,3,1,1,7,5,5,5,5]", all_ ["[3,6,2,7,10,10]"]) ] describe "q98730: Count trailing truths" $ do specEval @@ -676,14 +682,14 @@ testEval = describe "Evaluation" $ do ] specEval "çĉl∑" - [ ("[]", All False ["0"]) - , ("[0]", All False ["0"]) - , ("[1]", All False ["1"]) - , ("[0,1,1,0,0]", All False ["0"]) - , ("[1,1,1,0,1]", All False ["1"]) - , ("[1,1,0,1,1]", All False ["2"]) - , ("[0,0,1,1,1]", All False ["3"]) - , ("[1,1,1,1,1,1]", All False ["6"]) + [ ("[]", all_ ["0"]) + , ("[0]", all_ ["0"]) + , ("[1]", all_ ["1"]) + , ("[0,1,1,0,0]", all_ ["0"]) + , ("[1,1,1,0,1]", all_ ["1"]) + , ("[1,1,0,1,1]", all_ ["2"]) + , ("[0,0,1,1,1]", all_ ["3"]) + , ("[1,1,1,1,1,1]", all_ ["6"]) ] describe "q101389: Increment an Array" $ do specEval @@ -700,11 +706,11 @@ testEval = describe "Evaluation" $ do describe "q103624: Find the sum of all numbers below n that are a multiple of some set of numbers" $ do specEval "ᵒ%ᵐ∏¬x∙" - [ ("[2] 50", All False ["600"]) - , ("[3,5] 10", All False ["23"]) - , ("[4,2] 28", All False ["182"]) - , ("[7,5] 19", All False ["51"]) - , ("[2,3,5] 50", All False ["857"]) + [ ("[2] 50", all_ ["600"]) + , ("[3,5] 10", all_ ["23"]) + , ("[4,2] 28", all_ ["182"]) + , ("[7,5] 19", all_ ["51"]) + , ("[2,3,5] 50", all_ ["857"]) ] specEval "ᶠ{$~¦}∑" @@ -717,46 +723,46 @@ testEval = describe "Evaluation" $ do describe "q103756: Big numbers: Ultrafactorials" $ do specEval "→rF:E∑" - [ ("0", All False ["1"]) - , ("1", All False ["2"]) - , ("2", All False ["6"]) - , ("3", All False ["46662"]) + [ ("0", all_ ["1"]) + , ("1", all_ ["2"]) + , ("2", all_ ["6"]) + , ("3", all_ ["46662"]) ] describe "q104665: Coprimes up to N" $ do specEval "rG1Ĩ" - [ ("2", All False ["1"]) - , ("3", All False ["1", "2"]) - , ("6", All False ["1", "5"]) - , ("10", All False ["1", "3", "7", "9"]) - , ("20", All False ["1", "3", "7", "9", "11", "13", "17", "19"]) - , ("25", All False ["1", "2", "3", "4", "6", "7", "8", "9", "11", "12", "13", "14", "16", "17", "18", "19", "21", "22", "23", "24"]) - , ("30", All False ["1", "7", "11", "13", "17", "19", "23", "29"]) + [ ("2", all_ ["1"]) + , ("3", all_ ["1", "2"]) + , ("6", all_ ["1", "5"]) + , ("10", all_ ["1", "3", "7", "9"]) + , ("20", all_ ["1", "3", "7", "9", "11", "13", "17", "19"]) + , ("25", all_ ["1", "2", "3", "4", "6", "7", "8", "9", "11", "12", "13", "14", "16", "17", "18", "19", "21", "22", "23", "24"]) + , ("30", all_ ["1", "7", "11", "13", "17", "19", "23", "29"]) ] describe "q105861: Can this number be written in (3^x) - 1 format?" $ do specEval "3D←P∑" - [ ("2", All False ["1"]) - , ("26", All False ["3"]) - , ("1024", All False []) + [ ("2", all_ ["1"]) + , ("26", all_ ["3"]) + , ("1024", all_ []) ] describe "q106149: Compute the Median" $ do specEval ",o;↔ᶻÐlµ" - [ ("[1,2,3,4,5,6,7,8,9]", All False ["5"]) - , ("[1,4,3,2]", All False ["5/2"]) - , ("[3/2,3/2,3/2,3/2,3/2,3/2,3/2,3/2,3/2,-5,100000,13/10,7/5]", All False ["3/2"]) - , ("[3/2,3/2,3/2,3/2,3/2,3/2,3/2,3/2,3/2,3/2,-5,100000,13/10,7/5]", All False ["3/2"]) + [ ("[1,2,3,4,5,6,7,8,9]", all_ ["5"]) + , ("[1,4,3,2]", all_ ["5/2"]) + , ("[3/2,3/2,3/2,3/2,3/2,3/2,3/2,3/2,3/2,-5,100000,13/10,7/5]", all_ ["3/2"]) + , ("[3/2,3/2,3/2,3/2,3/2,3/2,3/2,3/2,3/2,3/2,-5,100000,13/10,7/5]", all_ ["3/2"]) ] describe "q106656: Bit run rundown" $ do specEval "ƂYṀ" - [ ("6", All False ["2"]) - , ("16", All False ["4"]) - , ("893", All False ["5"]) - , ("1337371", All False ["6"]) - , ("1", All False ["1"]) - , ("9965546", All False ["7"]) + [ ("6", all_ ["2"]) + , ("16", all_ ["4"]) + , ("893", all_ ["5"]) + , ("1337371", all_ ["6"]) + , ("1", all_ ["1"]) + , ("9965546", all_ ["7"]) ] describe "q108675: Is this word Lexically Ordered?" $ do specEval @@ -773,9 +779,9 @@ testEval = describe "Evaluation" $ do describe "q111678: N-dimensional N^N array filled with N" $ do specEval "ᵑᵉř^" - [ ("1", All False ["[1]"]) - , ("2", All False ["[[2,2],[2,2]]"]) - , ("3", All False ["[[[3,3,3],[3,3,3],[3,3,3]],[[3,3,3],[3,3,3],[3,3,3]],[[3,3,3],[3,3,3],[3,3,3]]]"]) + [ ("1", all_ ["[1]"]) + , ("2", all_ ["[[2,2],[2,2]]"]) + , ("3", all_ ["[[[3,3,3],[3,3,3],[3,3,3]],[[3,3,3],[3,3,3],[3,3,3]],[[3,3,3],[3,3,3],[3,3,3]]]"]) ] describe "q113238: Is it true? Ask Jelly!" $ do specEval @@ -799,35 +805,35 @@ testEval = describe "Evaluation" $ do describe "q118444: Stay away from zero" $ do specEval "1M" - [ ("0", All False ["1"]) - , ("1", All False ["1"]) - , ("2", All False ["2"]) - , ("3", All False ["3"]) - , ("4", All False ["4"]) - , ("5", All False ["5"]) - , ("6", All False ["6"]) - , ("7", All False ["7"]) + [ ("0", all_ ["1"]) + , ("1", all_ ["1"]) + , ("2", all_ ["2"]) + , ("3", all_ ["3"]) + , ("4", all_ ["4"]) + , ("5", all_ ["5"]) + , ("6", all_ ["6"]) + , ("7", all_ ["7"]) ] describe "q118597: Halve the falses" $ do specEval "ĭZĬ‼" - [ ("[1,0,0,1,0,0,1]", All False ["[1,0,1,0,1]"]) - , ("[1,1,0,0,1,1,0,0,1]", All False ["[1,1,0,1,1,0,1]"]) - , ("[1,1,0,0,1,1,1,0,0,1,1]", All False ["[1,1,0,1,1,1,0,1,1]"]) - , ("[1,1,1]", All False ["[1,1,1]"]) - , ("[0,0,1]", All False ["[0,1]"]) - , ("[0,0]", All False ["[0]"]) - , ("[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 False ["[1,1,1,0,0,1,1,1,1,0,1,0,1,1,0,1,1,1,1,0,1,0]"]) + [ ("[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]"]) + , ("[1,1,1]", all_ ["[1,1,1]"]) + , ("[0,0,1]", all_ ["[0,1]"]) + , ("[0,0]", all_ ["[0]"]) + , ("[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 False ["[1,0,1,0,1]"]) - , ("[1,1,0,0,1,1,0,0,1]", All False ["[1,1,0,1,1,0,1]"]) - , ("[1,1,0,0,1,1,1,0,0,1,1]", All False ["[1,1,0,1,1,1,0,1,1]"]) - , ("[1,1,1]", All False ["[1,1,1]"]) - , ("[0,0,1]", All False ["[0,1]"]) - , ("[0,0]", All False ["[0]"]) - , ("[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 False ["[1,1,1,0,0,1,1,1,1,0,1,0,1,1,0,1,1,1,1,0,1,0]"]) + [ ("[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]"]) + , ("[1,1,1]", all_ ["[1,1,1]"]) + , ("[0,0,1]", all_ ["[0,1]"]) + , ("[0,0]", all_ ["[0]"]) + , ("[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]"]) ] describe "q118960: Is this a function?" $ do specEval @@ -846,25 +852,25 @@ testEval = describe "Evaluation" $ do describe "q118982: Replace twos with threes" $ do specEval "ƒy1|∏" - [ ("1", All False ["1"]) - , ("2", All False ["3"]) - , ("3", All False ["3"]) - , ("4", All False ["9"]) - , ("5", All False ["5"]) - , ("6", All False ["9"]) - , ("7", All False ["7"]) - , ("8", All False ["27"]) - , ("9", All False ["9"]) - , ("10", All False ["15"]) + [ ("1", all_ ["1"]) + , ("2", all_ ["3"]) + , ("3", all_ ["3"]) + , ("4", all_ ["9"]) + , ("5", all_ ["5"]) + , ("6", all_ ["9"]) + , ("7", all_ ["7"]) + , ("8", all_ ["27"]) + , ("9", all_ ["9"]) + , ("10", all_ ["15"]) ] describe "q119854: Raise integer x to power x, without exponentiation built-ins" $ do specEval "ř∏" - [ ("2", All False ["4"]) - , ("3", All False ["27"]) - , ("5", All False ["3125"]) - , ("6", All False ["46656"]) - , ("10", All False ["10000000000"]) + [ ("2", all_ ["4"]) + , ("3", all_ ["27"]) + , ("5", all_ ["3125"]) + , ("6", all_ ["46656"]) + , ("10", all_ ["10000000000"]) ] describe "q120350: Determine if an Array contains something other than 2" $ do specEval @@ -924,8 +930,8 @@ testEval = describe "Evaluation" $ do describe "q125104: Cartesian product of two lists" $ do specEval "ᵐ~" - [ ("[\"abc\",\"123\"]", All False ["a1", "a2", "a3", "b1", "b2", "b3", "c1", "c2", "c3"]) - , ("[\"aa\",\"aba\"]", All False ["aa", "ab", "aa", "aa", "ab", "aa"]) + [ ("[\"abc\",\"123\"]", all_ ["a1", "a2", "a3", "b1", "b2", "b3", "c1", "c2", "c3"]) + , ("[\"aa\",\"aba\"]", all_ ["aa", "ab", "aa", "aa", "ab", "aa"]) ] describe "q126373: Am I a Fibonacci Number?" $ do specEval @@ -938,10 +944,10 @@ testEval = describe "Evaluation" $ do describe "q126699: Create a checkerboard matrix" $ do specEval "ᵒ+→Ö" - [ ("1", All False ["[[1]]"]) - , ("2", All False ["[[1,0],[0,1]]"]) - , ("3", All False ["[[1,0,1],[0,1,0],[1,0,1]]"]) - , ("4", All False ["[[1,0,1,0],[0,1,0,1],[1,0,1,0],[0,1,0,1]]"]) + [ ("1", all_ ["[[1]]"]) + , ("2", all_ ["[[1,0],[0,1]]"]) + , ("3", all_ ["[[1,0,1],[0,1,0],[1,0,1]]"]) + , ("4", all_ ["[[1,0,1,0],[0,1,0,1],[1,0,1,0],[0,1,0,1]]"]) ] describe "q130390: Is it a super-prime?" $ do specEval @@ -961,22 +967,22 @@ testEval = describe "Evaluation" $ do describe "q130454: Product of Divisors" $ do specEval "Ď∏" - [ ("1", All False ["1"]) - , ("2", All False ["2"]) - , ("3", All False ["3"]) - , ("4", All False ["8"]) - , ("5", All False ["5"]) - , ("6", All False ["36"]) - , ("7", All False ["7"]) - , ("8", All False ["64"]) - , ("9", All False ["27"]) - , ("10", All False ["100"]) - , ("12", All False ["1728"]) - , ("14", All False ["196"]) - , ("24", All False ["331776"]) - , ("25", All False ["125"]) - , ("28", All False ["21952"]) - , ("30", All False ["810000"]) + [ ("1", all_ ["1"]) + , ("2", all_ ["2"]) + , ("3", all_ ["3"]) + , ("4", all_ ["8"]) + , ("5", all_ ["5"]) + , ("6", all_ ["36"]) + , ("7", all_ ["7"]) + , ("8", all_ ["64"]) + , ("9", all_ ["27"]) + , ("10", all_ ["100"]) + , ("12", all_ ["1728"]) + , ("14", all_ ["196"]) + , ("24", all_ ["331776"]) + , ("25", all_ ["125"]) + , ("28", all_ ["21952"]) + , ("30", all_ ["810000"]) ] describe "q132379: Output the n-th Bell Number" $ do specEval @@ -999,59 +1005,59 @@ testEval = describe "Evaluation" $ do describe "q136887: Fold a List in Half" $ do specEval ";ᶜç↔ᶻ+" - [ ("[1,2,3,4,5,6,7,8]", All False ["[9,9,9,9]"]) - , ("[1,2,3,4,5,6,7]", All False ["[8,8,8,4]"]) + [ ("[1,2,3,4,5,6,7,8]", all_ ["[9,9,9,9]"]) + , ("[1,2,3,4,5,6,7]", all_ ["[8,8,8,4]"]) ] describe "q138510: Running second maximum of a list" $ do specEval "poil" - [ ("[1,5,2,3,5,9,5,8]", All False ["1", "2", "3", "5", "5", "5", "8"]) - , ("[1,1,2,2,3,3,4]", All False ["1", "1", "2", "2", "3", "3"]) - , ("[2,1,0,-1,0,1,2]", All False ["1", "1", "1", "1", "1", "2"]) + [ ("[1,5,2,3,5,9,5,8]", all_ ["1", "2", "3", "5", "5", "5", "8"]) + , ("[1,1,2,2,3,3,4]", all_ ["1", "1", "2", "2", "3", "3"]) + , ("[2,1,0,-1,0,1,2]", all_ ["1", "1", "1", "1", "1", "2"]) ] describe "q138982: Divisibility Streak" $ do specEval "ᵏ{ᵉ+→%Z" - [ ("2", All False ["1"]) - , ("3", All False ["2"]) - , ("4", All False ["1"]) - , ("5", All False ["2"]) - , ("6", All False ["1"]) - , ("7", All False ["3"]) - , ("8", All False ["1"]) - , ("9", All False ["2"]) - , ("10", All False ["1"]) - , ("2521", All False ["10"]) + [ ("2", all_ ["1"]) + , ("3", all_ ["2"]) + , ("4", all_ ["1"]) + , ("5", all_ ["2"]) + , ("6", all_ ["1"]) + , ("7", all_ ["3"]) + , ("8", all_ ["1"]) + , ("9", all_ ["2"]) + , ("10", all_ ["1"]) + , ("2521", all_ ["10"]) ] describe "q139804: Undo a Range of Numbers" $ do specEval "ᵏ{ᵐĝj=" - [ ("\"0123\"", All False ["4"]) - , ("\"0\"", All False ["1"]) - , ("\"012345678910111213141516171819202122232425262728293031323334353637383940\"", All False ["41"]) + [ ("\"0123\"", all_ ["4"]) + , ("\"0\"", all_ ["1"]) + , ("\"012345678910111213141516171819202122232425262728293031323334353637383940\"", all_ ["41"]) ] describe "q141949: Count edits accounting for grace period" $ do specEval "ˡ{C4+>‼" - [ ("[0]", All False ["1"]) - , ("[0,3,5,7]", All False ["2"]) - , ("[0,3,4,7,9,10,11,12]", All False ["3"]) - , ("[0,30,120]", All False ["3"]) - , ("[0,4,8,12,16]", All False ["3"]) - , ("[0,4,8,12,16,20]", All False ["3"]) - , ("[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19]", All False ["4"]) - , ("[0,5,10,15,20]", All False ["5"]) - , ("[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20]", All False ["5"]) - , ("[0,1,4,5,9,11,12,14,16,18,23,24,26,28,29,30]", All False ["6"]) + [ ("[0]", all_ ["1"]) + , ("[0,3,5,7]", all_ ["2"]) + , ("[0,3,4,7,9,10,11,12]", all_ ["3"]) + , ("[0,30,120]", all_ ["3"]) + , ("[0,4,8,12,16]", all_ ["3"]) + , ("[0,4,8,12,16,20]", all_ ["3"]) + , ("[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19]", all_ ["4"]) + , ("[0,5,10,15,20]", all_ ["5"]) + , ("[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20]", all_ ["5"]) + , ("[0,1,4,5,9,11,12,14,16,18,23,24,26,28,29,30]", all_ ["6"]) ] describe "q142071: Find the sum of the divisors of N" $ do specEval "Ď∑" - [ ("7", All False ["8"]) - , ("15", All False ["24"]) - , ("20", All False ["42"]) - , ("1", All False ["1"]) - , ("5", All False ["6"]) + [ ("7", all_ ["8"]) + , ("15", all_ ["24"]) + , ("20", all_ ["42"]) + , ("1", all_ ["1"]) + , ("5", all_ ["6"]) ] describe "q142534: Is it a completely even number?" $ do specEval @@ -1096,16 +1102,16 @@ testEval = describe "Evaluation" $ do describe "q144233: How many Wazirs can be placed on an N×N Chessboard?" $ do specEval "*äK" - [ ("7", All False ["25"]) - , ("8", All False ["32"]) - , ("100", All False ["5000"]) + [ ("7", all_ ["25"]) + , ("8", all_ ["32"]) + , ("100", all_ ["5000"]) ] describe "q145518: Square pyramidal numbers" $ do specEval "R:∙" - [ ("0", All False ["0"]) - , ("4", All False ["30"]) - , ("5", All False ["55"]) + [ ("0", all_ ["0"]) + , ("4", all_ ["30"]) + , ("5", all_ ["55"]) ] describe "q146059: Is my triangle right?" $ do specEval @@ -1133,54 +1139,54 @@ testEval = describe "Evaluation" $ do describe "q150117: Boustrophedonise" $ do specEval "ĭᵐ↔Ĭ" - [ ("[\"Here are some lines\",\"of text for you\",\"to make a\",\"boustrophedon\"]", All False ["[\"Here are some lines\",\"uoy rof txet fo\",\"to make a\",\"nodehportsuob\"]"]) - , ("[\"My boustrophedon\"]", All False ["[\"My boustrophedon\"]"]) - , ("[]", All False ["[]"]) - , ("[\"Some text\",[],\"More text\",[],[],\"Last bit of text\"]", All False ["[\"Some text\",[],\"More text\",[],[],\"txet fo tib tsaL\"]"]) + [ ("[\"Here are some lines\",\"of text for you\",\"to make a\",\"boustrophedon\"]", all_ ["[\"Here are some lines\",\"uoy rof txet fo\",\"to make a\",\"nodehportsuob\"]"]) + , ("[\"My boustrophedon\"]", all_ ["[\"My boustrophedon\"]"]) + , ("[]", all_ ["[]"]) + , ("[\"Some text\",[],\"More text\",[],[],\"Last bit of text\"]", all_ ["[\"Some text\",[],\"More text\",[],[],\"txet fo tib tsaL\"]"]) ] describe "q152114: Output the hours at 90 degrees" $ do specEval "258Ɗ+12%→" - [ ("1", All False ["[4,7,10]"]) - , ("2", All False ["[5,8,11]"]) - , ("3", All False ["[6,9,12]"]) - , ("4", All False ["[7,10,1]"]) - , ("5", All False ["[8,11,2]"]) - , ("6", All False ["[9,12,3]"]) - , ("7", All False ["[10,1,4]"]) - , ("8", All False ["[11,2,5]"]) - , ("9", All False ["[12,3,6]"]) - , ("10", All False ["[1,4,7]"]) - , ("11", All False ["[2,5,8]"]) - , ("12", All False ["[3,6,9]"]) + [ ("1", all_ ["[4,7,10]"]) + , ("2", all_ ["[5,8,11]"]) + , ("3", all_ ["[6,9,12]"]) + , ("4", all_ ["[7,10,1]"]) + , ("5", all_ ["[8,11,2]"]) + , ("6", all_ ["[9,12,3]"]) + , ("7", all_ ["[10,1,4]"]) + , ("8", all_ ["[11,2,5]"]) + , ("9", all_ ["[12,3,6]"]) + , ("10", all_ ["[1,4,7]"]) + , ("11", all_ ["[2,5,8]"]) + , ("12", all_ ["[3,6,9]"]) ] specEval "12Rᶠ{-Z3¦" - [ ("1", All False ["[4,7,10]"]) - , ("2", All False ["[5,8,11]"]) - , ("3", All False ["[6,9,12]"]) - , ("4", All False ["[1,7,10]"]) - , ("5", All False ["[2,8,11]"]) - , ("6", All False ["[3,9,12]"]) - , ("7", All False ["[1,4,10]"]) - , ("8", All False ["[2,5,11]"]) - , ("9", All False ["[3,6,12]"]) - , ("10", All False ["[1,4,7]"]) - , ("11", All False ["[2,5,8]"]) - , ("12", All False ["[3,6,9]"]) + [ ("1", all_ ["[4,7,10]"]) + , ("2", all_ ["[5,8,11]"]) + , ("3", all_ ["[6,9,12]"]) + , ("4", all_ ["[1,7,10]"]) + , ("5", all_ ["[2,8,11]"]) + , ("6", all_ ["[3,9,12]"]) + , ("7", all_ ["[1,4,10]"]) + , ("8", all_ ["[2,5,11]"]) + , ("9", all_ ["[3,6,12]"]) + , ("10", all_ ["[1,4,7]"]) + , ("11", all_ ["[2,5,8]"]) + , ("12", all_ ["[3,6,9]"]) ] describe "q153783: The first n numbers without consecutive equal binary digits" $ do specEval "RË3÷" - [ ("1", All False ["[0]"]) - , ("18", All False ["[0,1,2,5,10,21,42,85,170,341,682,1365,2730,5461,10922,21845,43690,87381]"]) + [ ("1", all_ ["[0]"]) + , ("18", all_ ["[0,1,2,5,10,21,42,85,170,341,682,1365,2730,5461,10922,21845,43690,87381]"]) ] describe "q162254: Generate a Walsh Matrix" $ do specEval "Ë:ᵒ&Þ£E" - [ ("0", All False ["[[1]]"]) - , ("1", All False ["[[1,1],[1,-1]]"]) - , ("2", All False ["[[1,1,1,1],[1,-1,1,-1],[1,1,-1,-1],[1,-1,-1,1]]"]) + [ ("0", all_ ["[[1]]"]) + , ("1", all_ ["[[1,1],[1,-1]]"]) + , ("2", all_ ["[[1,1,1,1],[1,-1,1,-1],[1,1,-1,-1],[1,-1,-1,1]]"]) ] describe "q164509: Sign-Swapping Sums" $ do specEval @@ -1196,9 +1202,9 @@ testEval = describe "Evaluation" $ do describe "q167573: Consecutive 1-Bits are Incremented" $ do specEval "ĉᵐ∫j" - [ ("[0,1,1,1,0,1,1,0,0,0,1,1,1,1,1,1]", All False ["[0,1,2,3,0,1,2,0,0,0,1,2,3,4,5,6]"]) - , ("[0,1,1,0,1,0,1,1,1,1,1,0,1,0,1,1,0,1,1,1,1,1,1,0,1,0,1,1,1,1,1,1,1,1]", All False ["[0,1,2,0,1,0,1,2,3,4,5,0,1,0,1,2,0,1,2,3,4,5,6,0,1,0,1,2,3,4,5,6,7,8]"]) - , ("[1,1,1,1,1,1,1,1,1,1,1,1,0,1]", All False ["[1,2,3,4,5,6,7,8,9,10,11,12,0,1]"]) + [ ("[0,1,1,1,0,1,1,0,0,0,1,1,1,1,1,1]", all_ ["[0,1,2,3,0,1,2,0,0,0,1,2,3,4,5,6]"]) + , ("[0,1,1,0,1,0,1,1,1,1,1,0,1,0,1,1,0,1,1,1,1,1,1,0,1,0,1,1,1,1,1,1,1,1]", all_ ["[0,1,2,0,1,0,1,2,3,4,5,0,1,0,1,2,0,1,2,3,4,5,6,0,1,0,1,2,3,4,5,6,7,8]"]) + , ("[1,1,1,1,1,1,1,1,1,1,1,1,0,1]", all_ ["[1,2,3,4,5,6,7,8,9,10,11,12,0,1]"]) ] describe "q169724: Is this number evil?" $ do specEval @@ -1213,81 +1219,81 @@ testEval = describe "Evaluation" $ do describe "q170047: Most Common Multiple" $ do specEval "Sđ*aŢṂ" - [ ("[2,3,4,5,6]", All False ["12"]) - , ("[7,2]", All False ["14"]) - , ("[2,3,3]", All False ["6"]) - , ("[3,3,3]", All False ["9"]) - , ("[1,1,1,1,2,2]", All False ["2"]) - , ("[6,200,10,120]", All False ["1200"]) - , ("[2,3,4,5,6,7,8,8]", All False ["24"]) - , ("[5,2,9,10,3,4,4,4,7]", All False ["20"]) - , ("[9,7,10,9,7,8,5,10,1]", All False ["63", "90", "70"]) + [ ("[2,3,4,5,6]", all_ ["12"]) + , ("[7,2]", all_ ["14"]) + , ("[2,3,3]", all_ ["6"]) + , ("[3,3,3]", all_ ["9"]) + , ("[1,1,1,1,2,2]", all_ ["2"]) + , ("[6,200,10,120]", all_ ["1200"]) + , ("[2,3,4,5,6,7,8,8]", all_ ["24"]) + , ("[5,2,9,10,3,4,4,4,7]", all_ ["20"]) + , ("[9,7,10,9,7,8,5,10,1]", all_ ["63", "90", "70"]) ] describe "q170695: Construct a line graph / conjugate graph" $ do specEval "S:đ∩z¿ᵐj" - [ ("[]", All False []) - , ("[[\"0\",\"1\"]]", All False []) - , ("[[\"0\",\"1\"],[\"1\",\"2\"]]", All False ["[\"01\",\"12\"]"]) - , ("[[\"a\",\"b\"],[\"b\",\"c\"],[\"c\",\"a\"]]", All False ["[\"ab\",\"bc\"]", "[\"ab\",\"ca\"]", "[\"bc\",\"ca\"]"]) + [ ("[]", all_ []) + , ("[[\"0\",\"1\"]]", all_ []) + , ("[[\"0\",\"1\"],[\"1\",\"2\"]]", all_ ["[\"01\",\"12\"]"]) + , ("[[\"a\",\"b\"],[\"b\",\"c\"],[\"c\",\"a\"]]", all_ ["[\"ab\",\"bc\"]", "[\"ab\",\"ca\"]", "[\"bc\",\"ca\"]"]) ] describe "q177221: String rotation - output string repeatedly moving first character to the end" $ do specEval ";$N," - [ ("\"john\"", All False ["ohnj", "hnjo", "njoh", "john"]) - , ("\"heehee\"", All False ["eeheeh", "eheehe", "heehee", "eeheeh", "eheehe", "heehee"]) + [ ("\"john\"", all_ ["ohnj", "hnjo", "njoh", "john"]) + , ("\"heehee\"", all_ ["eeheeh", "eheehe", "heehee", "eeheeh", "eheehe", "heehee"]) ] specEval "xŘ↔" - [ ("\"john\"", All False ["[\"njoh\",\"hnjo\",\"ohnj\",\"john\"]"]) - , ("\"heehee\"", All False ["[\"eheehe\",\"eeheeh\",\"heehee\",\"eheehe\",\"eeheeh\",\"heehee\"]"]) + [ ("\"john\"", all_ ["[\"njoh\",\"hnjo\",\"ohnj\",\"john\"]"]) + , ("\"heehee\"", all_ ["[\"eheehe\",\"eeheeh\",\"heehee\",\"eheehe\",\"eeheeh\",\"heehee\"]"]) ] describe "q175248: The inverse Collatz Conjecture" $ do specEval "ᶦ{Z:←½$3*→I" - [ ("0", All False ["0"]) - , ("1", All False ["1", "0"]) - , ("2", All False ["2", "7", "3", "1", "0"]) - , ("3", All False ["3", "1", "0"]) - , ("10", All False ["10", "31", "15", "7", "3", "1", "0"]) - , ("14", All False ["14", "43", "21", "10", "31", "15", "7", "3", "1", "0"]) + [ ("0", all_ ["0"]) + , ("1", all_ ["1", "0"]) + , ("2", all_ ["2", "7", "3", "1", "0"]) + , ("3", all_ ["3", "1", "0"]) + , ("10", all_ ["10", "31", "15", "7", "3", "1", "0"]) + , ("14", all_ ["14", "43", "21", "10", "31", "15", "7", "3", "1", "0"]) ] describe "q179464: Covering a Skyline with brush strokes" $ do specEval "ç-P‼∑" - [ ("[1,3,2,1,2,1,5,3,3,4,2]", All False ["9"]) - , ("[5,8]", All False ["8"]) - , ("[1,1,1,1]", All False ["1"]) - , ("[]", All False ["0"]) - , ("[0,0]", All False ["0"]) - , ("[2]", All False ["2"]) - , ("[2,0,2]", All False ["4"]) - , ("[10,9,8,9]", All False ["11"]) + [ ("[1,3,2,1,2,1,5,3,3,4,2]", all_ ["9"]) + , ("[5,8]", all_ ["8"]) + , ("[1,1,1,1]", all_ ["1"]) + , ("[]", all_ ["0"]) + , ("[0,0]", all_ ["0"]) + , ("[2]", all_ ["2"]) + , ("[2,0,2]", all_ ["4"]) + , ("[10,9,8,9]", all_ ["11"]) ] specEval "çM-_∑" - [ ("[1,3,2,1,2,1,5,3,3,4,2]", All False ["9"]) - , ("[5,8]", All False ["8"]) - , ("[1,1,1,1]", All False ["1"]) - , ("[]", All False ["0"]) - , ("[0,0]", All False ["0"]) - , ("[2]", All False ["2"]) - , ("[2,0,2]", All False ["4"]) - , ("[10,9,8,9]", All False ["11"]) + [ ("[1,3,2,1,2,1,5,3,3,4,2]", all_ ["9"]) + , ("[5,8]", all_ ["8"]) + , ("[1,1,1,1]", all_ ["1"]) + , ("[]", all_ ["0"]) + , ("[0,0]", all_ ["0"]) + , ("[2]", all_ ["2"]) + , ("[2,0,2]", all_ ["4"]) + , ("[10,9,8,9]", all_ ["11"]) ] describe "q180302: Count repetitions of an array" $ do specEval "u∕u#" - [ ("[1,10,16,4,8,10,9,19,2,15,18,19,10,9,17,15,19,5,13,20]", All False ["4"]) - , ("[11,8,6,15,9,19,2,2,4,19,14,19,13,12,16,13,0,5,0,8]", All False ["5"]) - , ("[9,7,8,16,3,9,20,19,15,6,8,4,18,14,19,12,12,16,11,19]", All False ["5"]) - , ("[10,17,17,7,2,18,7,13,3,10,1,5,15,4,6,0,19,4,17,0]", All False ["5"]) - , ("[12,7,17,13,5,3,4,15,20,15,5,18,18,18,4,8,15,13,11,13]", All False ["5"]) - , ("[0,3,6,1,5,2,16,1,6,3,12,1,16,5,4,5,6,17,4,8]", All False ["6"]) - , ("[11,19,2,3,11,15,19,8,2,12,12,20,13,18,1,11,19,7,11,2]", All False ["4"]) - , ("[6,4,11,14,17,3,17,11,2,16,14,1,2,1,15,15,12,10,11,13]", All False ["6"]) - , ("[0,19,2,0,10,10,16,9,19,9,15,0,10,18,0,17,18,18,0,9]", All False ["5"]) - , ("[1,19,17,17,0,2,14,10,10,12,5,14,16,7,15,15,18,11,17,7]", All False ["5"]) + [ ("[1,10,16,4,8,10,9,19,2,15,18,19,10,9,17,15,19,5,13,20]", all_ ["4"]) + , ("[11,8,6,15,9,19,2,2,4,19,14,19,13,12,16,13,0,5,0,8]", all_ ["5"]) + , ("[9,7,8,16,3,9,20,19,15,6,8,4,18,14,19,12,12,16,11,19]", all_ ["5"]) + , ("[10,17,17,7,2,18,7,13,3,10,1,5,15,4,6,0,19,4,17,0]", all_ ["5"]) + , ("[12,7,17,13,5,3,4,15,20,15,5,18,18,18,4,8,15,13,11,13]", all_ ["5"]) + , ("[0,3,6,1,5,2,16,1,6,3,12,1,16,5,4,5,6,17,4,8]", all_ ["6"]) + , ("[11,19,2,3,11,15,19,8,2,12,12,20,13,18,1,11,19,7,11,2]", all_ ["4"]) + , ("[6,4,11,14,17,3,17,11,2,16,14,1,2,1,15,15,12,10,11,13]", all_ ["6"]) + , ("[0,19,2,0,10,10,16,9,19,9,15,0,10,18,0,17,18,18,0,9]", all_ ["5"]) + , ("[1,19,17,17,0,2,14,10,10,12,5,14,16,7,15,15,18,11,17,7]", all_ ["5"]) ] specEval "Ţ~Ƶ" @@ -1393,31 +1399,31 @@ testEval = describe "Evaluation" $ do describe "q189932: Chunk + Enumerate a list of digits" $ do specEval "pNĉ#" - [("[4,4,4,7,7,9,9,9,9,2,2,2,4,4]", All False ["1", "1", "1", "2", "2", "3", "3", "3", "3", "4", "4", "4", "5", "5"])] + [("[4,4,4,7,7,9,9,9,9,2,2,2,4,4]", all_ ["1", "1", "1", "2", "2", "3", "3", "3", "3", "4", "4", "4", "5", "5"])] describe "q195592: Average Two Letters" $ do specEval "µkH" - [ ("[\"A\",\"C\"]", All False ["B"]) - , ("[\"a\",\"z\"]", All False ["m"]) - , ("[\"d\",\"j\"]", All False ["g"]) - , ("[\"B\",\"e\"]", All False ["S"]) - , ("[\"Z\",\"a\"]", All False ["]"]) + [ ("[\"A\",\"C\"]", all_ ["B"]) + , ("[\"a\",\"z\"]", all_ ["m"]) + , ("[\"d\",\"j\"]", all_ ["g"]) + , ("[\"B\",\"e\"]", all_ ["S"]) + , ("[\"Z\",\"a\"]", all_ ["]"]) ] describe "q196683: Round up my number" $ do specEval "/K*" - [ ("3 1", All False ["3"]) - , ("3 5", All False ["6"]) - , ("3 9", All False ["9"]) - , ("5 12", All False ["15"]) + [ ("3 1", all_ ["3"]) + , ("3 5", all_ ["6"]) + , ("3 9", all_ ["9"]) + , ("5 12", all_ ["15"]) ] describe "q199290: Reversed Iota's" $ do specEval "RRᵐ↔" - [("4", All False ["[[1],[2,1],[3,2,1],[4,3,2,1]]"])] + [("4", all_ ["[[1],[2,1],[3,2,1],[4,3,2,1]]"])] specEval "RpN↔" - [("4", All False ["[1]", "[2,1]", "[3,2,1]", "[4,3,2,1]"])] + [("4", all_ ["[1]", "[2,1]", "[3,2,1]", "[4,3,2,1]"])] describe "q199409: Is it a doubling sequence?" $ do specEval "∆$i≥" @@ -1432,48 +1438,48 @@ testEval = describe "Evaluation" $ do describe "q203797: Generate list of numbers and their negative counterparts" $ do specEval "ïᶜ_" - [ ("9 6", All False ["[6,7,8,9]", "[-6,-7,-8,-9]"]) - , ("6 6", All False ["[6]", "[-6]"]) + [ ("9 6", all_ ["[6,7,8,9]", "[-6,-7,-8,-9]"]) + , ("6 6", all_ ["[6]", "[-6]"]) ] describe "q206853: Find the perfect square!" $ do specEval "Ď√‼Ṁ" - [ ("4", All False ["2"]) - , ("9", All False ["3"]) - , ("12", All False ["2"]) - , ("13", All False ["1"]) - , ("108", All False ["6"]) + [ ("4", all_ ["2"]) + , ("9", all_ ["3"]) + , ("12", all_ ["2"]) + , ("13", all_ ["1"]) + , ("108", all_ ["6"]) ] describe "q207736: The shortest way to find one unique value when all other values are the same" $ do specEval "Ţṃ" - [ ("[1,1,1,2,1,1]", All False ["2"]) - , ("[3,5,5,5,5]", All False ["3"]) - , ("[9,2,9,9,9,9,9]", All False ["2"]) - , ("[4,4,4,6]", All False ["6"]) - , ("[5,8,8]", All False ["5"]) - , ("[8,5,8]", All False ["5"]) - , ("[8,8,5]", All False ["5"]) + [ ("[1,1,1,2,1,1]", all_ ["2"]) + , ("[3,5,5,5,5]", all_ ["3"]) + , ("[9,2,9,9,9,9,9]", all_ ["2"]) + , ("[4,4,4,6]", all_ ["6"]) + , ("[5,8,8]", all_ ["5"]) + , ("[8,5,8]", all_ ["5"]) + , ("[8,8,5]", all_ ["5"]) ] specEval "ĕᵖf" - [ ("[1,1,1,2,1,1]", All False ["2"]) - , ("[3,5,5,5,5]", All False ["3"]) - , ("[9,2,9,9,9,9,9]", All False ["2"]) - , ("[4,4,4,6]", All False ["6"]) - , ("[5,8,8]", All False ["5"]) - , ("[8,5,8]", All False ["5"]) - , ("[8,8,5]", All False ["5"]) + [ ("[1,1,1,2,1,1]", all_ ["2"]) + , ("[3,5,5,5,5]", all_ ["3"]) + , ("[9,2,9,9,9,9,9]", all_ ["2"]) + , ("[4,4,4,6]", all_ ["6"]) + , ("[5,8,8]", all_ ["5"]) + , ("[8,5,8]", all_ ["5"]) + , ("[8,8,5]", all_ ["5"]) ] specEval "oĉ~z" - [ ("[1,1,1,2,1,1]", All False ["2"]) - , ("[3,5,5,5,5]", All False ["3"]) - , ("[9,2,9,9,9,9,9]", All False ["2"]) - , ("[4,4,4,6]", All False ["6"]) - , ("[5,8,8]", All False ["5"]) - , ("[8,5,8]", All False ["5"]) - , ("[8,8,5]", All False ["5"]) + [ ("[1,1,1,2,1,1]", all_ ["2"]) + , ("[3,5,5,5,5]", all_ ["3"]) + , ("[9,2,9,9,9,9,9]", all_ ["2"]) + , ("[4,4,4,6]", all_ ["6"]) + , ("[5,8,8]", all_ ["5"]) + , ("[8,5,8]", all_ ["5"]) + , ("[8,8,5]", all_ ["5"]) ] describe "q208982: Antisymmetry of a Matrix" $ do specEval @@ -1485,9 +1491,9 @@ testEval = describe "Evaluation" $ do describe "q209146: How many 1's we get" $ do specEval "ïƊj1Ĉ" - [ ("100 1", All False ["21"]) - , ("200 11", All False ["138"]) - , ("678 123", All False ["182"]) + [ ("100 1", all_ ["21"]) + , ("200 11", all_ ["138"]) + , ("678 123", all_ ["182"]) ] describe "q210162: Is it almost-prime?" $ do specEval @@ -1509,45 +1515,45 @@ testEval = describe "Evaluation" $ do describe "q216734: Jelly's Untruth" $ do specEval "Ħ±" - [ ("[0,2,4,5]", All False ["[1,0,1,0,1,1]"]) - , ("[4]", All False ["[0,0,0,0,1]"]) - , ("[1,0,0,1]", All False ["[1,1]"]) - , ("[4,3,2]", All False ["[0,0,1,1,1]"]) - , ("[0]", All False ["[1]"]) + [ ("[0,2,4,5]", all_ ["[1,0,1,0,1,1]"]) + , ("[4]", all_ ["[0,0,0,0,1]"]) + , ("[1,0,0,1]", all_ ["[1,1]"]) + , ("[4,3,2]", all_ ["[0,0,1,1,1]"]) + , ("[0]", all_ ["[1]"]) ] describe "q217303: Linear integer function generator" $ do specEval "ᵉᵑ{ˣ∙ɔᵈç}T" - [ ("10 [0,1] [1,1]", All False ["[0,1,1,2,3,5,8,13,21,34]"]) - , ("20 [1,0,0] [1,1,0]", All False ["[1,0,0,1,0,1,1,1,2,2,3,4,5,7,9,12,16,21,28,37]"]) - , ("10 [3,0,2] [1,1,0]", All False ["[3,0,2,3,2,5,5,7,10,12]"]) - , ("5 [0,0] [1,1]", All False ["[0,0,0,0,0]"]) - , ("20 [0,-1,0,1] [0,1,0,-1]", All False ["[0,-1,0,1,-2,2,-1,-1,3,-4,3,0,-4,7,-7,3,4,-11,14,-10]"]) + [ ("10 [0,1] [1,1]", all_ ["[0,1,1,2,3,5,8,13,21,34]"]) + , ("20 [1,0,0] [1,1,0]", all_ ["[1,0,0,1,0,1,1,1,2,2,3,4,5,7,9,12,16,21,28,37]"]) + , ("10 [3,0,2] [1,1,0]", all_ ["[3,0,2,3,2,5,5,7,10,12]"]) + , ("5 [0,0] [1,1]", all_ ["[0,0,0,0,0]"]) + , ("20 [0,-1,0,1] [0,1,0,-1]", all_ ["[0,-1,0,1,-2,2,-1,-1,3,-4,3,0,-4,7,-7,3,4,-11,14,-10]"]) ] describe "q224125: Replace all items with their counts" $ do specEval "ᵐĈ" - [ ("[1]", All False ["[1]"]) - , ("[1,2]", All False ["[1,1]"]) - , ("[1,1]", All False ["[2,2]"]) - , ("[1,4,4]", All False ["[1,2,2]"]) - , ("[4,4,2]", All False ["[2,2,1]"]) - , ("[4,4,4,4]", All False ["[4,4,4,4]"]) - , ("[10,20,10,20]", All False ["[2,2,2,2]"]) - , ("[1,2,2,4,4,4,4]", All False ["[1,2,2,4,4,4,4]"]) - , ("[1,2,2,1,4,8,1]", All False ["[3,2,2,3,1,1,3]"]) + [ ("[1]", all_ ["[1]"]) + , ("[1,2]", all_ ["[1,1]"]) + , ("[1,1]", all_ ["[2,2]"]) + , ("[1,4,4]", all_ ["[1,2,2]"]) + , ("[4,4,2]", all_ ["[2,2,1]"]) + , ("[4,4,4,4]", all_ ["[4,4,4,4]"]) + , ("[10,20,10,20]", all_ ["[2,2,2,2]"]) + , ("[1,2,2,4,4,4,4]", all_ ["[1,2,2,4,4,4,4]"]) + , ("[1,2,2,1,4,8,1]", all_ ["[3,2,2,3,1,1,3]"]) ] describe "q225203: Delannoy numbers" $ do specEval "Ṁ→ᵒÇ∏ƃ" - [ ("[5,8]", All False ["13073"]) - , ("[5,7]", All False ["7183"]) - , ("[3,9]", All False ["1159"]) - , ("[8,6]", All False ["40081"]) - , ("[1,7]", All False ["15"]) - , ("[7,0]", All False ["1"]) - , ("[11,6]", All False ["227305"]) - , ("[0,4]", All False ["1"]) + [ ("[5,8]", all_ ["13073"]) + , ("[5,7]", all_ ["7183"]) + , ("[3,9]", all_ ["1159"]) + , ("[8,6]", all_ ["40081"]) + , ("[1,7]", all_ ["15"]) + , ("[7,0]", all_ ["1"]) + , ("[11,6]", all_ ["227305"]) + , ("[0,4]", all_ ["1"]) ] specEval "ʷ{į1?-ň" @@ -1560,35 +1566,35 @@ testEval = describe "Evaluation" $ do describe "q226593: Split a list into maximal equal-sum sections" $ do specEval "O:ᵐ∑≡$Ðaṁl" - [ ("[9,5,1,2,9,2]", All False ["[[1,2,9,2],[9,5]]"]) - , ("[1,1,3,5,7,4]", All False ["[[3,4],[7],[1,1,5]]"]) - , ("[2,9,6,1,5,8,2]", All False ["[[1,8,2],[6,5],[2,9]]"]) - , ("[5,4,1]", All False ["[[4,1],[5]]"]) - , ("[3,8,1,4,2,2]", All False ["[[3,1,4,2],[8,2]]"]) - , ("[6,9,3,8,1]", All False ["[[8,1],[6,3],[9]]"]) - , ("[4,1,6,9,1,4,5,2]", All False ["[[1,9,4,2],[4,6,1,5]]"]) - , ("[8,7,8,6,1]", All False ["[[8,6,1],[7,8]]"]) - , ("[2,7,4,5]", All False ["[[4,5],[2,7]]"]) - , ("[5,2,1,4,4]", All False ["[[4,4],[5,2,1]]"]) - , ("[5,7,4,6,2]", All False ["[[4,6,2],[5,7]]"]) - , ("[4,1,6,6,9]", All False ["[[4,9],[1,6,6]]"]) - , ("[2,6,4]", All False ["[[2,4],[6]]"]) - , ("[6,3,1,6,8,4,5,7]", All False ["[[1,8,4,7],[6,3,6,5]]"]) - , ("[2,2,2]", All False ["[[2],[2],[2]]"]) - , ("[2,4,5]", All False ["[[2,4,5]]"]) + [ ("[9,5,1,2,9,2]", all_ ["[[1,2,9,2],[9,5]]"]) + , ("[1,1,3,5,7,4]", all_ ["[[3,4],[7],[1,1,5]]"]) + , ("[2,9,6,1,5,8,2]", all_ ["[[1,8,2],[6,5],[2,9]]"]) + , ("[5,4,1]", all_ ["[[4,1],[5]]"]) + , ("[3,8,1,4,2,2]", all_ ["[[3,1,4,2],[8,2]]"]) + , ("[6,9,3,8,1]", all_ ["[[8,1],[6,3],[9]]"]) + , ("[4,1,6,9,1,4,5,2]", all_ ["[[1,9,4,2],[4,6,1,5]]"]) + , ("[8,7,8,6,1]", all_ ["[[8,6,1],[7,8]]"]) + , ("[2,7,4,5]", all_ ["[[4,5],[2,7]]"]) + , ("[5,2,1,4,4]", all_ ["[[4,4],[5,2,1]]"]) + , ("[5,7,4,6,2]", all_ ["[[4,6,2],[5,7]]"]) + , ("[4,1,6,6,9]", all_ ["[[4,9],[1,6,6]]"]) + , ("[2,6,4]", all_ ["[[2,4],[6]]"]) + , ("[6,3,1,6,8,4,5,7]", all_ ["[[1,8,4,7],[6,3,6,5]]"]) + , ("[2,2,2]", all_ ["[[2],[2],[2]]"]) + , ("[2,4,5]", all_ ["[[2,4,5]]"]) ] describe "q229624: Generalised multi-dimensional chess knight's moves" $ do specEval "8ᵚ~ᵖ{≈←ň‼į=" - [ ("[0,7]", All False ["[1,5]", "[2,6]"]) - , ("[3,4]", All False ["[1,3]", "[1,5]", "[2,2]", "[2,6]", "[4,2]", "[4,6]", "[5,3]", "[5,5]"]) - , ("[7,7,7]", All False ["[5,6,7]", "[5,7,6]", "[6,5,7]", "[6,7,5]", "[7,5,6]", "[7,6,5]"]) + [ ("[0,7]", all_ ["[1,5]", "[2,6]"]) + , ("[3,4]", all_ ["[1,3]", "[1,5]", "[2,2]", "[2,6]", "[4,2]", "[4,6]", "[5,3]", "[5,5]"]) + , ("[7,7,7]", all_ ["[5,6,7]", "[5,7,6]", "[6,5,7]", "[6,7,5]", "[7,5,6]", "[7,6,5]"]) ] specEval "0*2R+ŋ↕ũ+ň8<" - [ ("[0,7]", All False ["[1,5]", "[2,6]"]) - , ("[3,4]", All False ["[4,6]", "[4,2]", "[2,6]", "[2,2]", "[5,5]", "[5,3]", "[1,5]", "[1,3]"]) - , ("[7,7,7]", All False ["[6,5,7]", "[6,7,5]", "[5,6,7]", "[5,7,6]", "[7,6,5]", "[7,5,6]"]) + [ ("[0,7]", all_ ["[1,5]", "[2,6]"]) + , ("[3,4]", all_ ["[4,6]", "[4,2]", "[2,6]", "[2,2]", "[5,5]", "[5,3]", "[1,5]", "[1,3]"]) + , ("[7,7,7]", all_ ["[6,5,7]", "[6,7,5]", "[5,6,7]", "[5,7,6]", "[7,6,5]", "[7,5,6]"]) ] describe "q230402: Is this a Permutation of 1..n" $ do specEval @@ -1634,16 +1640,16 @@ testEval = describe "Evaluation" $ do describe "q231654: Third Stirling numbers of the second kind" $ do specEval "→4ᵒE∑∆l" - [ ("1", All False ["1"]) - , ("2", All False ["6"]) - , ("3", All False ["25"]) - , ("4", All False ["90"]) - , ("5", All False ["301"]) - , ("6", All False ["966"]) - , ("7", All False ["3025"]) - , ("8", All False ["9330"]) - , ("9", All False ["28501"]) - , ("10", All False ["86526"]) + [ ("1", all_ ["1"]) + , ("2", all_ ["6"]) + , ("3", all_ ["25"]) + , ("4", all_ ["90"]) + , ("5", all_ ["301"]) + , ("6", all_ ["966"]) + , ("7", all_ ["3025"]) + , ("8", all_ ["9330"]) + , ("9", all_ ["28501"]) + , ("10", all_ ["86526"]) ] specEval "O3L" @@ -1658,27 +1664,40 @@ testEval = describe "Evaluation" $ do , ("9", Count 3025) , ("10", Count 9330) ] + describe "q233182: Split into sublists of specified sizes" $ do + specEval + "J$ᶻL" + [ ("[4,5,1,2,6,1,7,9,6] [2,4,3]", all_ ["[[4,5],[1,2,6,1],[7,9,6]]"]) + , ("[4,2,8,7,3,5,9,3,1,9,1,8,1,7,2,8,3,7,6] [1,3,1,14]", all_ ["[[4],[2,8,7],[3],[5,9,3,1,9,1,8,1,7,2,8,3,7,6]]"]) + , ("[8,7,4,6] [1,3]", all_ ["[[8],[7,4,6]]"]) + , ("[7] [1]", all_ ["[[7]]"]) + , ("[6,4,3,8,9,3,6,5,7,8,3,2,5,1,2] [3,3,3,3,3]", all_ ["[[6,4,3],[8,9,3],[6,5,7],[8,3,2],[5,1,2]]"]) + , ("[2,7,9,3,8,1,5] [4,3]", all_ ["[[2,7,9,3],[8,1,5]]"]) + , ("[1,9,8,9,6,3,4,2,3,4,1,8,5,5,2,9,3,6,7] [3,1,2,13]", all_ ["[[1,9,8],[9],[6,3],[4,2,3,4,1,8,5,5,2,9,3,6,7]]"]) + , ("[7,4,4,7,5,5] [1,2,3]", all_ ["[[7],[4,4],[7,5,5]]"]) + , ("[8,7,3] [3]", all_ ["[[8,7,3]]"]) + ] describe "q233641: Hunt for discount" $ do specEval "o↔ĭ∑ä" - [ ("[10]", All False ["0"]) - , ("[10,20]", All False ["5"]) - , ("[10,20,30]", All False ["10"]) - , ("[2,2,2,2]", All False ["2"]) - , ("[4,10,6,8,2,40]", All False ["9"]) + [ ("[10]", all_ ["0"]) + , ("[10,20]", all_ ["5"]) + , ("[10,20,30]", all_ ["10"]) + , ("[2,2,2,2]", all_ ["2"]) + , ("[4,10,6,8,2,40]", all_ ["9"]) ] describe "q235964: Implement the hyperfactorial" $ do specEval "R:E∏" - [ ("0", All False ["1"]) - , ("1", All False ["1"]) - , ("2", All False ["4"]) - , ("3", All False ["108"]) - , ("4", All False ["27648"]) - , ("5", All False ["86400000"]) - , ("6", All False ["4031078400000"]) - , ("7", All False ["3319766398771200000"]) - , ("8", All False ["55696437941726556979200000"]) + [ ("0", all_ ["1"]) + , ("1", all_ ["1"]) + , ("2", all_ ["4"]) + , ("3", all_ ["108"]) + , ("4", all_ ["27648"]) + , ("5", all_ ["86400000"]) + , ("6", all_ ["4031078400000"]) + , ("7", all_ ["3319766398771200000"]) + , ("8", all_ ["55696437941726556979200000"]) ] describe "q236285: Maybe fractal sequence?" $ do specEval @@ -1697,69 +1716,69 @@ testEval = describe "Evaluation" $ do describe "q238607: Converge to a number" $ do specEval "ƊsC↔~cɗ-" - [ ("4", All False ["1", "2", "3", "4"]) - , ("16", All False ["10", "11", "12", "13", "14", "15", "16"]) - , ("35", All False ["10", "20", "30", "31", "32", "33", "34", "35"]) - , ("103", All False ["100", "101", "102", "103"]) - , ("320", All False ["100", "200", "300", "310", "320"]) - , ("354", All False ["100", "200", "300", "310", "320", "330", "340", "350", "351", "352", "353", "354"]) - , ("1000", All False ["1000"]) - , ("1001", All False ["1000", "1001"]) - , ("4037 ", All False ["1000", "2000", "3000", "4000", "4010", "4020", "4030", "4031", "4032", "4033", "4034", "4035", "4036", "4037"]) + [ ("4", all_ ["1", "2", "3", "4"]) + , ("16", all_ ["10", "11", "12", "13", "14", "15", "16"]) + , ("35", all_ ["10", "20", "30", "31", "32", "33", "34", "35"]) + , ("103", all_ ["100", "101", "102", "103"]) + , ("320", all_ ["100", "200", "300", "310", "320"]) + , ("354", all_ ["100", "200", "300", "310", "320", "330", "340", "350", "351", "352", "353", "354"]) + , ("1000", all_ ["1000"]) + , ("1001", all_ ["1000", "1001"]) + , ("4037 ", all_ ["1000", "2000", "3000", "4000", "4010", "4020", "4030", "4031", "4032", "4033", "4034", "4035", "4036", "4037"]) ] specEval "¢Bx¢E$y↔∫" - [ ("4", All False ["[1,2,3,4]"]) - , ("16", All False ["[10,11,12,13,14,15,16]"]) - , ("35", All False ["[10,20,30,31,32,33,34,35]"]) - , ("103", All False ["[100,101,102,103]"]) - , ("320", All False ["[100,200,300,310,320]"]) - , ("354", All False ["[100,200,300,310,320,330,340,350,351,352,353,354]"]) - , ("1000", All False ["[1000]"]) - , ("1001", All False ["[1000,1001]"]) - , ("4037 ", All False ["[1000,2000,3000,4000,4010,4020,4030,4031,4032,4033,4034,4035,4036,4037]"]) + [ ("4", all_ ["[1,2,3,4]"]) + , ("16", all_ ["[10,11,12,13,14,15,16]"]) + , ("35", all_ ["[10,20,30,31,32,33,34,35]"]) + , ("103", all_ ["[100,101,102,103]"]) + , ("320", all_ ["[100,200,300,310,320]"]) + , ("354", all_ ["[100,200,300,310,320,330,340,350,351,352,353,354]"]) + , ("1000", all_ ["[1000]"]) + , ("1001", all_ ["[1000,1001]"]) + , ("4037 ", all_ ["[1000,2000,3000,4000,4010,4020,4030,4031,4032,4033,4034,4035,4036,4037]"]) ] describe "q241267: Remove odd indices and double the even indices" $ do specEval "ĭ:Ĭ" - [ ("\"abcdef\"", All False ["bbddff"]) - , ("\"umbrella\"", All False ["mmrrllaa"]) - , ("\"looooooooong text\"", All False ["ooooooooooggttxx"]) - , ("\"abc\"", All False ["bb"]) - , ("\"xkcd\"", All False ["kkdd"]) - , ("\"Hello, World!\"", All False ["eell,,WWrrdd"]) - , ("\"D\"", All False ["[]"]) - , ("\"KK\"", All False ["KK"]) - , ("\"Hi\"", All False ["ii"]) - , ("\"odd_length!\"", All False ["dd__eegghh"]) - , ("\"\"", All False ["[]"]) + [ ("\"abcdef\"", all_ ["bbddff"]) + , ("\"umbrella\"", all_ ["mmrrllaa"]) + , ("\"looooooooong text\"", all_ ["ooooooooooggttxx"]) + , ("\"abc\"", all_ ["bb"]) + , ("\"xkcd\"", all_ ["kkdd"]) + , ("\"Hello, World!\"", all_ ["eell,,WWrrdd"]) + , ("\"D\"", all_ ["[]"]) + , ("\"KK\"", all_ ["KK"]) + , ("\"Hi\"", all_ ["ii"]) + , ("\"odd_length!\"", all_ ["dd__eegghh"]) + , ("\"\"", all_ ["[]"]) ] describe "q241474: Move to Right and left" $ do specEval "çç+" - [ ("[1,2,3]", All False ["[1,2,4,2,3]"]) - , ("[4,2]", All False ["[4,2,4,2]"]) - , ("[1]", All False ["[1,0,1]"]) - , ("[7,4,5,6]", All False ["[7,4,12,10,5,6]"]) - , ("[1,2,4,2,1]", All False ["[1,2,5,4,5,2,1]"]) - , ("[1,0,1]", All False ["[1,0,2,0,1]"]) - , ("[1,0,2,0,1]", All False ["[1,0,3,0,3,0,1]"]) - , ("[8,7,6,5,4]", All False ["[8,7,14,12,10,5,4]"]) - , ("[1,4,9,16]", All False ["[1,4,10,20,9,16]"]) - , ("[1,2]", All False ["[1,2,1,2]"]) + [ ("[1,2,3]", all_ ["[1,2,4,2,3]"]) + , ("[4,2]", all_ ["[4,2,4,2]"]) + , ("[1]", all_ ["[1,0,1]"]) + , ("[7,4,5,6]", all_ ["[7,4,12,10,5,6]"]) + , ("[1,2,4,2,1]", all_ ["[1,2,5,4,5,2,1]"]) + , ("[1,0,1]", all_ ["[1,0,2,0,1]"]) + , ("[1,0,2,0,1]", all_ ["[1,0,3,0,3,0,1]"]) + , ("[8,7,6,5,4]", all_ ["[8,7,14,12,10,5,4]"]) + , ("[1,4,9,16]", all_ ["[1,4,10,20,9,16]"]) + , ("[1,2]", all_ ["[1,2,1,2]"]) ] specEval "5Ƃ×" - [ ("[1,2,3]", All False ["[1,2,4,2,3]"]) - , ("[4,2]", All False ["[4,2,4,2]"]) - , ("[1]", All False ["[1,0,1]"]) - , ("[7,4,5,6]", All False ["[7,4,12,10,5,6]"]) - , ("[1,2,4,2,1]", All False ["[1,2,5,4,5,2,1]"]) - , ("[1,0,1]", All False ["[1,0,2,0,1]"]) - , ("[1,0,2,0,1]", All False ["[1,0,3,0,3,0,1]"]) - , ("[8,7,6,5,4]", All False ["[8,7,14,12,10,5,4]"]) - , ("[1,4,9,16]", All False ["[1,4,10,20,9,16]"]) - , ("[1,2]", All False ["[1,2,1,2]"]) + [ ("[1,2,3]", all_ ["[1,2,4,2,3]"]) + , ("[4,2]", all_ ["[4,2,4,2]"]) + , ("[1]", all_ ["[1,0,1]"]) + , ("[7,4,5,6]", all_ ["[7,4,12,10,5,6]"]) + , ("[1,2,4,2,1]", all_ ["[1,2,5,4,5,2,1]"]) + , ("[1,0,1]", all_ ["[1,0,2,0,1]"]) + , ("[1,0,2,0,1]", all_ ["[1,0,3,0,3,0,1]"]) + , ("[8,7,6,5,4]", all_ ["[8,7,14,12,10,5,4]"]) + , ("[1,4,9,16]", all_ ["[1,4,10,20,9,16]"]) + , ("[1,2]", all_ ["[1,2,1,2]"]) ] describe "q245804: Damerau-Damerau distance" $ do specEval @@ -1775,80 +1794,80 @@ testEval = describe "Evaluation" $ do describe "q247104: Euler characteristic of a binary matrix" $ do specEval "2R:4*Ð×j:1Ĉ$2÷3Ĉ-" - [ ("[[1]]", All False ["1"]) - , ("[[1,0,1]]", All False ["2"]) - , ("[[1,0],[0,1]]", All False ["1"]) - , ("[[0,1,0],[0,0,1],[1,1,1]]", All False ["1"]) - , ("[[0,1,1,0],[1,0,1,1],[1,1,0,1],[0,1,1,0]]", All False ["-1"]) - , ("[[0,0,1,1,0],[0,1,1,1,1],[1,1,0,1,1],[0,1,1,0,0]]", All False ["0"]) - , ("[[1,1,1,0,1,1,1],[1,0,1,0,1,0,1],[1,1,1,0,1,1,1]]", All False ["0"]) - , ("[[1,1,1,1,1],[1,0,0,0,1],[1,0,1,0,1],[1,0,0,0,1],[1,1,1,1,1]] ", All False ["1"]) + [ ("[[1]]", all_ ["1"]) + , ("[[1,0,1]]", all_ ["2"]) + , ("[[1,0],[0,1]]", all_ ["1"]) + , ("[[0,1,0],[0,0,1],[1,1,1]]", all_ ["1"]) + , ("[[0,1,1,0],[1,0,1,1],[1,1,0,1],[0,1,1,0]]", all_ ["-1"]) + , ("[[0,0,1,1,0],[0,1,1,1,1],[1,1,0,1,1],[0,1,1,0,0]]", all_ ["0"]) + , ("[[1,1,1,0,1,1,1],[1,0,1,0,1,0,1],[1,1,1,0,1,1,1]]", all_ ["0"]) + , ("[[1,1,1,1,1],[1,0,0,0,1],[1,0,1,0,1],[1,0,0,0,1],[1,1,1,1,1]] ", all_ ["1"]) ] describe "q247326: There's more than one way to skin a set" $ do specEval "S∑a:u∕u" - [ ("[1]", All False ["[]"]) - , ("[4,5,2]", All False ["[]"]) - , ("[9,10,11,12]", All False ["[21]"]) - , ("[2,3,5,6]", All False ["[5,8,11]"]) - , ("[15,16,7,1,4]", All False ["[16,23,20,27]"]) - , ("[1,2,3,4,5]", All False ["[3,4,5,6,7,8,9,10,11,12]"]) + [ ("[1]", all_ ["[]"]) + , ("[4,5,2]", all_ ["[]"]) + , ("[9,10,11,12]", all_ ["[21]"]) + , ("[2,3,5,6]", all_ ["[5,8,11]"]) + , ("[15,16,7,1,4]", all_ ["[16,23,20,27]"]) + , ("[1,2,3,4,5]", all_ ["[3,4,5,6,7,8,9,10,11,12]"]) ] specEval "Ë→Ƃʳ×2m2Ĩ" - [ ("[1]", All False []) - , ("[4,5,2]", All False []) - , ("[9,10,11,12]", All False ["21"]) - , ("[2,3,5,6]", All False ["5", "8", "11"]) - , ("[15,16,7,1,4]", All False ["16", "20", "23", "27"]) - , ("[1,2,3,4,5]", All False ["3", "4", "5", "6", "7", "8", "9", "10", "11", "12"]) + [ ("[1]", all_ []) + , ("[4,5,2]", all_ []) + , ("[9,10,11,12]", all_ ["21"]) + , ("[2,3,5,6]", all_ ["5", "8", "11"]) + , ("[15,16,7,1,4]", all_ ["16", "20", "23", "27"]) + , ("[1,2,3,4,5]", all_ ["3", "4", "5", "6", "7", "8", "9", "10", "11", "12"]) ] describe "q247398: Alternating sums of multidimensional arrays" $ do specEval "ʷ{£d" - [ ("[1]", All False ["1"]) - , ("[-1]", All False ["-1"]) - , ("[1,2]", All False ["-1"]) - , ("[2,0,4]", All False ["6"]) - , ("[1,-2]", All False ["3"]) - , ("[[1]]", All False ["1"]) - , ("[[1,2],[4,8]]", All False ["3"]) - , ("[[-1,-1],[2,2]]", All False ["0"]) - , ("[[[[1],[2]],[[4],[8]]]]", All False ["3"]) - , ("[[[1,2],[2,4],[4,8]],[[-4,-4],[-1,1],[2,-2]]]", All False ["-9"]) - ] - describe "q247676: Generate All False 8 Knight's Moves" $ do + [ ("[1]", all_ ["1"]) + , ("[-1]", all_ ["-1"]) + , ("[1,2]", all_ ["-1"]) + , ("[2,0,4]", all_ ["6"]) + , ("[1,-2]", all_ ["3"]) + , ("[[1]]", all_ ["1"]) + , ("[[1,2],[4,8]]", all_ ["3"]) + , ("[[-1,-1],[2,2]]", all_ ["0"]) + , ("[[[[1],[2]],[[4],[8]]]]", all_ ["3"]) + , ("[[[1,2],[2,4],[4,8]],[[-4,-4],[-1,1],[2,-2]]]", all_ ["-9"]) + ] + describe "q247676: Generate all_ 8 Knight's Moves" $ do specEval "į→ŋ" - [("", All False ["[1,2]", "[1,-2]", "[-1,2]", "[-1,-2]", "[2,1]", "[2,-1]", "[-2,1]", "[-2,-1]"])] + [("", all_ ["[1,2]", "[1,-2]", "[-1,2]", "[-1,-2]", "[2,1]", "[2,-1]", "[-2,1]", "[-2,-1]"])] describe "q248245: Make a list flat" $ do specEval "V" - [ ("[[3],[3,[[6]]]]", All False ["[3,3,6]"]) - , ("[]", All False ["[]"]) - , ("[[],[]]", All False ["[]"]) - , ("[[1,4,6],[1,[2,67,[5,7]]]]", All False ["[1,4,6,1,2,67,5,7]"]) + [ ("[[3],[3,[[6]]]]", all_ ["[3,3,6]"]) + , ("[]", all_ ["[]"]) + , ("[[],[]]", all_ ["[]"]) + , ("[[1,4,6],[1,[2,67,[5,7]]]]", all_ ["[1,4,6,1,2,67,5,7]"]) ] describe "q248445: Print the power set of the power set ... of an empty set" $ do specEval "Øᶦ{Sa" - [("", All True ["[]", "[[]]", "[[],[[]]]", "[[],[[]],[[[]]],[[],[[]]]]"])] + [("", truncate_ ["[]", "[[]]", "[[],[[]]]", "[[],[[]],[[[]]],[[],[[]]]]"])] describe "q248991: The Unaverageables" $ do specEval "ᶠ{+ä∩z" - [ ("[1,2,3]", All False ["[2]"]) - , ("[1,2,3,4]", All False ["[]"]) - , ("[1,3,4,5]", All False ["[4]"]) - , ("[1,5,10,20,40]", All False ["[1,5,10,20,40]"]) - , ("[1,5,6,10]", All False ["[1,5,6,10]"]) - , ("[1,2,3,4,10,52,100,200]", All False ["[10,52,200]"]) - , ("[1,2,3,5,8,13,21,34]", All False ["[]"]) + [ ("[1,2,3]", all_ ["[2]"]) + , ("[1,2,3,4]", all_ ["[]"]) + , ("[1,3,4,5]", all_ ["[4]"]) + , ("[1,5,10,20,40]", all_ ["[1,5,10,20,40]"]) + , ("[1,5,6,10]", all_ ["[1,5,6,10]"]) + , ("[1,2,3,4,10,52,100,200]", all_ ["[10,52,200]"]) + , ("[1,2,3,5,8,13,21,34]", all_ ["[]"]) ] describe "q249868: Every possible pairing" $ do specEval "O2ᵚL" - [ ("2", All False ["[[0,1]]"]) - , ("4", All False ["[[2,3],[0,1]]", "[[1,3],[0,2]]", "[[0,3],[1,2]]"]) + [ ("2", all_ ["[[0,1]]"]) + , ("4", all_ ["[[2,3],[0,1]]", "[[1,3],[0,2]]", "[[0,3],[1,2]]"]) ] describe "q250283: Rearrange to a palindrome" $ do specEval @@ -1888,15 +1907,15 @@ testEval = describe "Evaluation" $ do describe "q250942: Divisor of a string" $ do specEval "J≡" - [ ("\"abcdabcd\"", All False ["abcd", "abcdabcd"]) - , ("\"aaa\"", All False ["a", "aaa"]) - , ("\"aaaaaaaa\"", All False ["a", "aa", "aaaa", "aaaaaaaa"]) - , ("\"abcdef\"", All False ["abcdef"]) + [ ("\"abcdabcd\"", all_ ["abcd", "abcdabcd"]) + , ("\"aaa\"", all_ ["a", "aaa"]) + , ("\"aaaaaaaa\"", all_ ["a", "aa", "aaaa", "aaaaaaaa"]) + , ("\"abcdef\"", all_ ["abcdef"]) ] describe "q251594: Find the nth Mersenne Prime" $ do specEval "ŇË←Q" - [("", All True ["3", "7", "31", "127", "8191"])] + [("", truncate_ ["3", "7", "31", "127", "8191"])] describe "q251674: Number of ways to make an amount with coins" $ do specEval "Ṗ¢$¦" @@ -1930,24 +1949,24 @@ testEval = describe "Evaluation" $ do describe "q252057: Numbers vs. Strings: Language fitness challenge" $ do specEval "D:×Ṁ" - [ ("2 22", All False ["2"]) - , ("2 8", All False ["1"]) - , ("2 15", All False ["4"]) - , ("3 100", All False ["6"]) - , ("10 12345", All False ["46"]) + [ ("2 22", all_ ["2"]) + , ("2 8", all_ ["1"]) + , ("2 15", all_ ["4"]) + , ("3 100", all_ ["6"]) + , ("10 12345", all_ ["46"]) ] describe "q252082: Reconstruct Matrix from its diagonals" $ do specEval "#2÷:→:ᵒ{ᵋ{-+@}m@" - [ ("[[5]]", All False ["[[5]]"]) - , ("[[0],[1,69],[13]]", All False ["[[1,0],[13,69]]"]) - , ("[[25],[0,1],[6,23,10],[420,9],[67]]", All False ["[[6,0,25],[420,23,1],[67,9,10]]"]) + [ ("[[5]]", all_ ["[[5]]"]) + , ("[[0],[1,69],[13]]", all_ ["[[1,0],[13,69]]"]) + , ("[[25],[0,1],[6,23,10],[420,9],[67]]", all_ ["[[6,0,25],[420,23,1],[67,9,10]]"]) ] specEval "Øc;$ᶻ,ŤxᶻŘ" - [ ("[[5]]", All False ["[[5]]"]) - , ("[[0],[1,69],[13]]", All False ["[[1,13],[0,69]]"]) - , ("[[25],[0,1],[6,23,10],[420,9],[67]]", All False ["[[6,420,67],[9,0,23],[1,10,25]]"]) + [ ("[[5]]", all_ ["[[5]]"]) + , ("[[0],[1,69],[13]]", all_ ["[[1,13],[0,69]]"]) + , ("[[25],[0,1],[6,23,10],[420,9],[67]]", all_ ["[[6,420,67],[9,0,23],[1,10,25]]"]) ] describe "q252126: Count the number of compositions of n in which the greatest part is odd" $ do specEval @@ -1963,148 +1982,148 @@ testEval = describe "Evaluation" $ do describe "q252189: Carryless factors" $ do specEval "Rᶠ{$R~ᵃƂ×Öƃ=" - [ ("2", All False ["[1,2]"]) - , ("4", All False ["[1,2,4]"]) - , ("5", All False ["[1,3,5]"]) - , ("6", All False ["[1,2,3,6]"]) - , ("25", All False ["[1,25]"]) - , ("39", All False ["[1,3,5,11,29,39]"]) - , ("42", All False ["[1,2,7,14,21,42]"]) - , ("100", All False ["[1,2,4,25,50,100]"]) + [ ("2", all_ ["[1,2]"]) + , ("4", all_ ["[1,2,4]"]) + , ("5", all_ ["[1,3,5]"]) + , ("6", all_ ["[1,2,3,6]"]) + , ("25", all_ ["[1,25]"]) + , ("39", all_ ["[1,3,5,11,29,39]"]) + , ("42", all_ ["[1,2,7,14,21,42]"]) + , ("100", all_ ["[1,2,4,25,50,100]"]) ] describe "q252303: Cut along the lines" $ do specEval "ĉJᵐj" - [ ("[1,0]", All False ["[[1],[0]]", "[[1,0]]"]) - , ("[1,1,1,1]", All False ["[[1,1,1,1]]"]) - , ("[1,1,0,0,1]", All False ["[[1,1],[0,0],[1]]", "[[1,1],[0,0,1]]", "[[1,1,0,0],[1]]", "[[1,1,0,0,1]]"]) + [ ("[1,0]", all_ ["[[1],[0]]", "[[1,0]]"]) + , ("[1,1,1,1]", all_ ["[[1,1,1,1]]"]) + , ("[1,1,0,0,1]", all_ ["[[1,1],[0,0],[1]]", "[[1,1],[0,0,1]]", "[[1,1,0,0],[1]]", "[[1,1,0,0,1]]"]) ] describe "q252927: Make a Court Transcriber" $ do specEval "ᶠ{JS=}ş" - [ ("[\"dictionary\",\"transcriber\"] [\"dic\",\"ion\",\"ary\"]", All False ["dictionary"]) - , ("[\"dictionary\",\"transcriber\"] [\"tra\",\"scr\",\"ber\"]", All False ["transcriber"]) + [ ("[\"dictionary\",\"transcriber\"] [\"dic\",\"ion\",\"ary\"]", all_ ["dictionary"]) + , ("[\"dictionary\",\"transcriber\"] [\"tra\",\"scr\",\"ber\"]", all_ ["transcriber"]) ] describe "q254224: Maximum average ord" $ do specEval "ᵐµṀ" - [ ("[\"hello\",\"world\",\"bye\"]", All False ["552/5"]) - , ("[\"code\",\"golf\",\"stack\",\"exchange\"]", All False ["534/5"]) - , ("[\"!@#\",\"$%^\",\"&*(\"]", All False ["167/3"]) - , ("[\"qwertyuiop[\",\"asdfghjkl;\",\"zxcvbnm,\"]", All False ["1220/11"]) + [ ("[\"hello\",\"world\",\"bye\"]", all_ ["552/5"]) + , ("[\"code\",\"golf\",\"stack\",\"exchange\"]", all_ ["534/5"]) + , ("[\"!@#\",\"$%^\",\"&*(\"]", all_ ["167/3"]) + , ("[\"qwertyuiop[\",\"asdfghjkl;\",\"zxcvbnm,\"]", all_ ["1220/11"]) ] describe "q254947: Range of ASCII values" $ do specEval "o:h-l" - [ ("\"Hello, World!\"", All False ["82"]) - , ("\"aaaaa\"", All False ["0"]) - , ("\"Code Golf\"", All False ["79"]) - , ("\"Stack Exchange\"", All False ["88"]) - , ("\"ASCII\"", All False ["18"]) - , ("\"eo:h-l\"", All False ["66"]) + [ ("\"Hello, World!\"", all_ ["82"]) + , ("\"aaaaa\"", all_ ["0"]) + , ("\"Code Golf\"", all_ ["79"]) + , ("\"Stack Exchange\"", all_ ["88"]) + , ("\"ASCII\"", all_ ["18"]) + , ("\"eo:h-l\"", all_ ["66"]) ] describe "q255274: CGAC2022 Day 7: Fen The Wicked" $ do specEval "p↔:#:ËGT∑" - [ ("[]", All False []) - , ("[999]", All False ["999"]) - , ("[3,1,4]", All False ["3", "4", "4"]) - , ("[3,1,4,1,5,9,2,6]", All False ["3", "4", "4", "9", "5", "14", "2", "31"]) + [ ("[]", all_ []) + , ("[999]", all_ ["999"]) + , ("[3,1,4]", all_ ["3", "4", "4"]) + , ("[3,1,4,1,5,9,2,6]", all_ ["3", "4", "4", "9", "5", "14", "2", "31"]) ] specEval "x:→&xï@ᵐ∑" - [ ("[]", All False ["[]"]) - , ("[999]", All False ["[999]"]) - , ("[3,1,4]", All False ["[3,4,4]"]) - , ("[3,1,4,1,5,9,2,6]", All False ["[3,4,4,9,5,14,2,31]"]) + [ ("[]", all_ ["[]"]) + , ("[999]", all_ ["[999]"]) + , ("[3,1,4]", all_ ["[3,4,4]"]) + , ("[3,1,4,1,5,9,2,6]", all_ ["[3,4,4,9,5,14,2,31]"]) ] describe "q255344: CGAC2022 Day 9: Playing with bits" $ do specEval "Ňᵖ{:ÄXÞ½=" - [ ("1", All True ["1", "2", "3", "4", "6", "7", "8", "12", "14", "15"]) - , ("2", All True ["5", "9", "10", "11", "13", "17", "18", "19", "20", "22"]) - , ("3", All True ["21", "37", "41", "42", "43", "45", "53", "69", "73", "74"]) - , ("4", All True ["85", "149", "165", "169", "170", "171", "173", "181", "213", "277"]) - , ("5", All True ["341", "597", "661", "677", "681", "682", "683", "685", "693", "725"]) + [ ("1", truncate_ ["1", "2", "3", "4", "6", "7", "8", "12", "14", "15"]) + , ("2", truncate_ ["5", "9", "10", "11", "13", "17", "18", "19", "20", "22"]) + , ("3", truncate_ ["21", "37", "41", "42", "43", "45", "53", "69", "73", "74"]) + , ("4", truncate_ ["85", "149", "165", "169", "170", "171", "173", "181", "213", "277"]) + , ("5", truncate_ ["341", "597", "661", "677", "681", "682", "683", "685", "693", "725"]) ] describe "q255373: CGAC2022 Day 10: Help Santa sort presents!" $ do specEval "ˡ{ᵗ≡ĭ?}aṀ" - [ ("[1]", All False ["0"]) - , ("[1,0,1,0,1,0,1]", All False ["1"]) - , ("[1,0,1,0,1,1]", All False ["3"]) - , ("[1,0,1,1,0,0,1,1,0,1,1,1,0,0,0,1,1,0,1,0,1,1,1,0,0]", All False ["5"]) + [ ("[1]", all_ ["0"]) + , ("[1,0,1,0,1,0,1]", all_ ["1"]) + , ("[1,0,1,0,1,1]", all_ ["3"]) + , ("[1,0,1,1,0,0,1,1,0,1,1,1,0,0,0,1,1,0,1,0,1,1,1,0,0]", all_ ["5"]) ] describe "q255650: Sum every second digit in a number" $ do specEval "Ɗĭ∑" - [ ("10", All False ["0"]) - , ("101011", All False ["1"]) - , ("548915381", All False ["26"]) - , ("999999", All False ["27"]) - , ("2147483647", All False ["29"]) - , ("999999999", All False ["36"]) + [ ("10", all_ ["0"]) + , ("101011", all_ ["1"]) + , ("548915381", all_ ["26"]) + , ("999999", all_ ["27"]) + , ("2147483647", all_ ["29"]) + , ("999999999", all_ ["36"]) ] describe "q256017: CGAC2022 Day 25: When The Planets Align" $ do specEval "ᵏ{*+$/1%≡" - [ ("[0,0] [0,0] [1,1]", All False ["0"]) - , ("[1,0] [1,0] [100,100]", All False ["99"]) - , ("[1,5,3] [0,1,0] [4,8,12]", All False ["5"]) + [ ("[0,0] [0,0] [1,1]", all_ ["0"]) + , ("[1,0] [1,0] [100,100]", all_ ["99"]) + , ("[1,5,3] [0,1,0] [4,8,12]", all_ ["5"]) ] describe "q256034: Normal Subgroups of S4" $ do specEval "@ᵃ{x-¬∑}ä-" - [ ("[0,1,2,3]", All False ["2"]) - , ("[0,1,3,2]", All False ["0"]) - , ("[0,2,1,3]", All False ["0"]) - , ("[0,2,3,1]", All False ["1/2"]) - , ("[0,3,1,2]", All False ["1/2"]) - , ("[0,3,2,1]", All False ["0"]) - , ("[1,0,2,3]", All False ["0"]) - , ("[1,0,3,2]", All False ["-2"]) - , ("[1,2,0,3]", All False ["1/2"]) - , ("[1,2,3,0]", All False ["0"]) - , ("[1,3,0,2]", All False ["0"]) - , ("[1,3,2,0]", All False ["1/2"]) + [ ("[0,1,2,3]", all_ ["2"]) + , ("[0,1,3,2]", all_ ["0"]) + , ("[0,2,1,3]", all_ ["0"]) + , ("[0,2,3,1]", all_ ["1/2"]) + , ("[0,3,1,2]", all_ ["1/2"]) + , ("[0,3,2,1]", all_ ["0"]) + , ("[1,0,2,3]", all_ ["0"]) + , ("[1,0,3,2]", all_ ["-2"]) + , ("[1,2,0,3]", all_ ["1/2"]) + , ("[1,2,3,0]", all_ ["0"]) + , ("[1,3,0,2]", all_ ["0"]) + , ("[1,3,2,0]", all_ ["1/2"]) ] describe "q256147: Find the Prime Signature" $ do specEval "ƒo↔" - [ ("1", All False ["[]"]) - , ("2", All False ["[1]"]) - , ("4", All False ["[2]"]) - , ("6", All False ["[1,1]"]) - , ("8", All False ["[3]"]) - , ("12", All False ["[2,1]"]) - , ("16", All False ["[4]"]) - , ("24", All False ["[3,1]"]) - , ("30", All False ["[1,1,1]"]) - , ("32", All False ["[5]"]) - , ("36", All False ["[2,2]"]) - , ("1234567", All False ["[1,1]"]) - , ("5174928", All False ["[5,4,3]"]) - , ("8388608", All False ["[23]"]) - , ("9999991", All False ["[1]"]) + [ ("1", all_ ["[]"]) + , ("2", all_ ["[1]"]) + , ("4", all_ ["[2]"]) + , ("6", all_ ["[1,1]"]) + , ("8", all_ ["[3]"]) + , ("12", all_ ["[2,1]"]) + , ("16", all_ ["[4]"]) + , ("24", all_ ["[3,1]"]) + , ("30", all_ ["[1,1,1]"]) + , ("32", all_ ["[5]"]) + , ("36", all_ ["[2,2]"]) + , ("1234567", all_ ["[1,1]"]) + , ("5174928", all_ ["[5,4,3]"]) + , ("8388608", all_ ["[23]"]) + , ("9999991", all_ ["[1]"]) ] describe "q256502: Guess the song title" $ do specEval "ŢṂaş" - [("[\"Hello, world\",\"Hello, world\",\"I just got to say it, hello world\",\"Goodbye, world\",\"Goodbye, world\",\"Goodbye\"]", All False ["Hello, world"])] + [("[\"Hello, world\",\"Hello, world\",\"I just got to say it, hello world\",\"Goodbye, world\",\"Goodbye, world\",\"Goodbye\"]", all_ ["Hello, world"])] describe "q256814: Knight to fork!" $ do specEval "ᵐ{į→ŋ+}≡H" - [ ("[\"d6\",\"f6\",\"g3\"]", All False ["e4"]) - , ("[\"d4\",\"d6\",\"e7\"]", All False ["f5"]) - , ("[\"c3\",\"f2\",\"b2\"]", All False ["d1"]) + [ ("[\"d6\",\"f6\",\"g3\"]", all_ ["e4"]) + , ("[\"d4\",\"d6\",\"e7\"]", all_ ["f5"]) + , ("[\"c3\",\"f2\",\"b2\"]", all_ ["d1"]) ] describe "q256920: Simplify a Cycle" $ do specEval "Cᶦ{ᵈsf¡C" - [ ("[1,2,3,4,2,5]", All False ["1", "2", "5"]) - , ("[4,3,6,2,3,8,5,2,8,7]", All False ["4", "3", "8", "7"]) - , ("[1,1,2]", All False ["1", "2"]) - , ("[1,2,7,2,7,2,3,7]", All False ["1", "2", "3", "7"]) + [ ("[1,2,3,4,2,5]", all_ ["1", "2", "5"]) + , ("[4,3,6,2,3,8,5,2,8,7]", all_ ["4", "3", "8", "7"]) + , ("[1,1,2]", all_ ["1", "2"]) + , ("[1,2,7,2,7,2,3,7]", all_ ["1", "2", "3", "7"]) ] describe "q256978: Painting with Line Filler" $ do specEval @@ -2121,38 +2140,38 @@ testEval = describe "Evaluation" $ do describe "q257631: Time to shortest permutation" $ do specEval "↕ᵃ{Jᵐɗ\"∩<\"<60b}-_Paṁ" - [ ("[1,1,4,3]", All False ["91"]) - , ("[0,1,0,1]", All False ["9"]) - , ("[1,7,3,8]", All False ["59"]) - , ("[1,4,2,1]", All False ["413"]) - , ("[1,3,2,0]", All False ["413"]) - , ("[2,3,4,1]", All False []) - , ("[0,0,0,0]", All False []) + [ ("[1,1,4,3]", all_ ["91"]) + , ("[0,1,0,1]", all_ ["9"]) + , ("[1,7,3,8]", all_ ["59"]) + , ("[1,4,2,1]", all_ ["413"]) + , ("[1,3,2,0]", all_ ["413"]) + , ("[2,3,4,1]", all_ []) + , ("[0,0,0,0]", all_ []) ] describe "q257649: Arbitrary Apple Dilemma" $ do specEval ":←/∏*" - [ ("[3,4,6] 10", All False ["24"]) - , ("[2] 14", All False ["28"]) - , ("[6] 30", All False ["36"]) - , ("[4,3], 20", All False ["40"]) - , ("[5,8,7], 9", All False ["15"]) - , ("[2,9,4,8], 7", All False ["24"]) + [ ("[3,4,6] 10", all_ ["24"]) + , ("[2] 14", all_ ["28"]) + , ("[6] 30", all_ ["36"]) + , ("[4,3], 20", all_ ["40"]) + , ("[5,8,7], 9", all_ ["15"]) + , ("[2,9,4,8], 7", all_ ["24"]) ] describe "q257372: Smallest Bit Rotation" $ do specEval "ƂxŘƃṁ" - [ ("177", All False ["27"]) - , ("1", All False ["1"]) - , ("12", All False ["3"]) - , ("23", All False ["15"]) - , ("34", All False ["5"]) - , ("45", All False ["27"]) - , ("56", All False ["7"]) - , ("67", All False ["7"]) - , ("78", All False ["29"]) - , ("89", All False ["27"]) - , ("100", All False ["19"]) + [ ("177", all_ ["27"]) + , ("1", all_ ["1"]) + , ("12", all_ ["3"]) + , ("23", all_ ["15"]) + , ("34", all_ ["5"]) + , ("45", all_ ["27"]) + , ("56", all_ ["7"]) + , ("67", all_ ["7"]) + , ("78", all_ ["29"]) + , ("89", all_ ["27"]) + , ("100", all_ ["19"]) ] describe "q257458: Sum of Consecutive Squares" $ do specEval @@ -2171,15 +2190,15 @@ testEval = describe "Evaluation" $ do describe "q257752: Print all pandigital numbers" $ do specEval "Ňᵖ{*$Bu$L" - [ ("2", All True ["1", "2", "3", "4", "5", "6"]) - , ("3", All True ["5", "7", "11", "14", "15", "16", "17", "19"]) - , ("4", All True ["27", "30", "39", "45"]) + [ ("2", truncate_ ["1", "2", "3", "4", "5", "6"]) + , ("3", truncate_ ["5", "7", "11", "14", "15", "16", "17", "19"]) + , ("4", truncate_ ["27", "30", "39", "45"]) ] specEval "Ňᵖ{$Bçu#=" - [ ("2", All True ["1", "2", "3", "4", "5", "6"]) - , ("3", All True ["5", "7", "11", "14", "15", "16", "17", "19"]) - , ("4", All True ["27", "30", "39", "45"]) + [ ("2", truncate_ ["1", "2", "3", "4", "5", "6"]) + , ("3", truncate_ ["5", "7", "11", "14", "15", "16", "17", "19"]) + , ("4", truncate_ ["27", "30", "39", "45"]) ] describe "q257998: Recognize a counting tree" $ do specEval @@ -2201,24 +2220,24 @@ testEval = describe "Evaluation" $ do describe "q258110: A Fine sequence with fine interpretations" $ do specEval "→ᵉ_rÇ∫µA" - [ ("0", All False ["1"]) - , ("1", All False ["0"]) - , ("2", All False ["1"]) - , ("3", All False ["2"]) - , ("4", All False ["6"]) - , ("5", All False ["18"]) - , ("6", All False ["57"]) - , ("7", All False ["186"]) - , ("8", All False ["622"]) - , ("9", All False ["2120"]) + [ ("0", all_ ["1"]) + , ("1", all_ ["0"]) + , ("2", all_ ["1"]) + , ("3", all_ ["2"]) + , ("4", all_ ["6"]) + , ("5", all_ ["18"]) + , ("6", all_ ["57"]) + , ("7", all_ ["186"]) + , ("8", all_ ["622"]) + , ("9", all_ ["2120"]) ] describe "q258299: Primes with Distinct Prime Digits" $ do specEval "ƤƊQůɗ" - [("", All True ["2", "3", "5", "7", "23", "37", "53", "73", "257", "523", "2357", "2753", "3257", "3527", "5237", "5273", "7253", "7523"])] + [("", truncate_ ["2", "3", "5", "7", "23", "37", "53", "73", "257", "523", "2357", "2753", "3257", "3527", "5237", "5273", "7253", "7523"])] specEval "¢SQ↕ɗQao" - [("", All False ["[2,3,5,7,23,37,53,73,257,523,2357,2753,3257,3527,5237,5273,7253,7523]"])] + [("", all_ ["[2,3,5,7,23,37,53,73,257,523,2357,2753,3257,3527,5237,5273,7253,7523]"])] describe "q258335: Shortest Code to Find the Smallest Missing Positive Integer" $ do specEval "ŇPᵖf" @@ -2232,32 +2251,32 @@ testEval = describe "Evaluation" $ do describe "q258432: Shortest code to generate all Pythagorean triples up to a given limit" $ do specEval "RSᵖ{:*Ɔ$đ+=" - [ ("15", All False ["[3,4,5]", "[6,8,10]", "[5,12,13]", "[9,12,15]"]) - , ("5", All False ["[3,4,5]"]) + [ ("15", all_ ["[3,4,5]", "[6,8,10]", "[5,12,13]", "[9,12,15]"]) + , ("5", all_ ["[3,4,5]"]) ] specEval "RS2L::∙√ɔ$≤" - [ ("15", All False ["[3,4,5]", "[6,8,10]", "[5,12,13]", "[9,12,15]"]) - , ("5", All False ["[3,4,5]"]) + [ ("15", all_ ["[3,4,5]", "[6,8,10]", "[5,12,13]", "[9,12,15]"]) + , ("5", all_ ["[3,4,5]"]) ] describe "q258511: Longest Valid Parentheses" $ do specEval "q£E→∫x>çƆᵖLaṀ" - [ ("\"(()())\"", All False ["6"]) - , ("\")()())\"", All False ["4"]) - , ("\"()(())\"", All False ["6"]) - , ("\"()(()\"", All False ["2"]) - , ("\"))\"", All False ["0"]) - , ("\"\"", All False ["0"]) + [ ("\"(()())\"", all_ ["6"]) + , ("\")()())\"", all_ ["4"]) + , ("\"()(())\"", all_ ["6"]) + , ("\"()(()\"", all_ ["2"]) + , ("\"))\"", all_ ["0"]) + , ("\"\"", all_ ["0"]) ] describe "q258951: \"Sort\" by element duplication" $ do specEval "ᶦ{:Ɔ≥$tI}ṁ" - [ ("[4,3,1,2]", All False ["1", "1", "1", "2"]) - , ("[1,2,3,4]", All False ["1", "2", "3", "4"]) - , ("[3,2,1,0]", All False ["0", "1", "2", "3"]) - , ("[1,2,3,1]", All False ["1", "1", "2", "3"]) - , ("[101,103,101,105]", All False ["101", "101", "101", "105"]) + [ ("[4,3,1,2]", all_ ["1", "1", "1", "2"]) + , ("[1,2,3,4]", all_ ["1", "2", "3", "4"]) + , ("[3,2,1,0]", all_ ["0", "1", "2", "3"]) + , ("[1,2,3,1]", all_ ["1", "1", "2", "3"]) + , ("[101,103,101,105]", all_ ["101", "101", "101", "105"]) ] describe "q258992: Guessing on straws" $ do specEval @@ -2346,24 +2365,24 @@ testEval = describe "Evaluation" $ do , ("5 4", Count 0) , ("5 5", Count 120) ] - describe "q259576: All False of the Boards" $ do + describe "q259576: all_ of the Boards" $ do specEval "į3ƂÐ3~ᵑᵐç3~ᵑçaᵐᶜ{0*}∑ƶ" [ ("", Count 215) - , ("", All True ["[[0,1,0,1],[1,1,1,1],[0,1,0,1],[1,1,1,1]]", "[[0,1,0,1],[1,1,1,1],[0,1,1,0],[1,1,1,1]]"]) + , ("", truncate_ ["[[0,1,0,1],[1,1,1,1],[0,1,0,1],[1,1,1,1]]", "[[0,1,0,1],[1,1,1,1],[0,1,1,0],[1,1,1,1]]"]) ] describe "q259633: Make a Custom Bayer Matrix" $ do specEval "ᵒ{ᵃƂv≈Ä+ç4ŗd" - [ ("1", All False ["[[0]]"]) - , ("2", All False ["[[0,1/2],[3/4,1/4]]"]) - , ("4", All False ["[[0,1/2,1/8,5/8],[3/4,1/4,7/8,3/8],[3/16,11/16,1/16,9/16],[15/16,7/16,13/16,5/16]]"]) + [ ("1", all_ ["[[0]]"]) + , ("2", all_ ["[[0,1/2],[3/4,1/4]]"]) + , ("4", all_ ["[[0,1/2,1/8,5/8],[3/4,1/4,7/8,3/8],[3/16,11/16,1/16,9/16],[15/16,7/16,13/16,5/16]]"]) ] specEval "0UU$ᵑ{4*4ᵐ+↔3Ř;ᶻᶻ,j" - [ ("0", All False ["[[0]]"]) - , ("1", All False ["[[0,2],[3,1]]"]) - , ("2", All False ["[[0,8,2,10],[12,4,14,6],[3,11,1,9],[15,7,13,5]]"]) + [ ("0", all_ ["[[0]]"]) + , ("1", all_ ["[[0,2],[3,1]]"]) + , ("2", all_ ["[[0,8,2,10],[12,4,14,6],[3,11,1,9],[15,7,13,5]]"]) ] describe "q259707: Shortest distinguishable slice" $ do specEval @@ -2375,36 +2394,36 @@ testEval = describe "Evaluation" $ do describe "q259881: The Jaccard Index" $ do specEval ",Ţ←µ" - [ ("[1,2] []", All False ["0"]) - , ("[-7,3,-9] [9,2,3,4]", All False ["1/6"]) - , ("[1,2,3] [2,4,6]", All False ["1/5"]) - , ("[0,64] [0,64,89,93]", All False ["1/2"]) - , ("[6,42,7,1] [42,7,6]", All False ["3/4"]) - , ("[3,6,9] [3,6,9]", All False ["1"]) + [ ("[1,2] []", all_ ["0"]) + , ("[-7,3,-9] [9,2,3,4]", all_ ["1/6"]) + , ("[1,2,3] [2,4,6]", all_ ["1/5"]) + , ("[0,64] [0,64,89,93]", all_ ["1/2"]) + , ("[6,42,7,1] [42,7,6]", all_ ["3/4"]) + , ("[3,6,9] [3,6,9]", all_ ["1"]) ] specEval "ᵋ∩Ŭᵃ#/" - [ ("[1,2] []", All False ["0"]) - , ("[-7,3,-9] [9,2,3,4]", All False ["1/6"]) - , ("[1,2,3] [2,4,6]", All False ["1/5"]) - , ("[0,64] [0,64,89,93]", All False ["1/2"]) - , ("[6,42,7,1] [42,7,6]", All False ["3/4"]) - , ("[3,6,9] [3,6,9]", All False ["1"]) + [ ("[1,2] []", all_ ["0"]) + , ("[-7,3,-9] [9,2,3,4]", all_ ["1/6"]) + , ("[1,2,3] [2,4,6]", all_ ["1/5"]) + , ("[0,64] [0,64,89,93]", all_ ["1/2"]) + , ("[6,42,7,1] [42,7,6]", all_ ["3/4"]) + , ("[3,6,9] [3,6,9]", all_ ["1"]) ] describe "q259875: How Super is this Prime?" $ do specEval "ˡ{Qƥ}Ƃ#←" - [ ("2", All False ["0"]) - , ("3", All False ["1"]) - , ("11", All False ["2"]) - , ("211", All False ["1"]) - , ("277", All False ["2"]) - , ("823", All False ["0"]) - , ("4397", All False ["2"]) - , ("5381", All False ["3"]) - , ("171697", All False ["2"]) - , ("499403", All False ["2"]) - , ("648391", All False ["3"]) + [ ("2", all_ ["0"]) + , ("3", all_ ["1"]) + , ("11", all_ ["2"]) + , ("211", all_ ["1"]) + , ("277", all_ ["2"]) + , ("823", all_ ["0"]) + , ("4397", all_ ["2"]) + , ("5381", all_ ["3"]) + , ("171697", all_ ["2"]) + , ("499403", all_ ["2"]) + , ("648391", all_ ["3"]) ] describe "q259987: String Comparison" $ do specEval @@ -2419,16 +2438,16 @@ testEval = describe "Evaluation" $ do describe "q260120: Alternating factorial" $ do specEval "RF£b" - [ ("0", All False ["0"]) - , ("1", All False ["1"]) - , ("2", All False ["1"]) - , ("3", All False ["5"]) - , ("4", All False ["19"]) - , ("5", All False ["101"]) - , ("6", All False ["619"]) - , ("7", All False ["4421"]) - , ("8", All False ["35899"]) - , ("9", All False ["326981"]) + [ ("0", all_ ["0"]) + , ("1", all_ ["1"]) + , ("2", all_ ["1"]) + , ("3", all_ ["5"]) + , ("4", all_ ["19"]) + , ("5", all_ ["101"]) + , ("6", all_ ["619"]) + , ("7", all_ ["4421"]) + , ("8", all_ ["35899"]) + , ("9", all_ ["326981"]) ] describe "q260198: String Concatenate" $ do specEval @@ -2468,93 +2487,93 @@ testEval = describe "Evaluation" $ do describe "q260370: Counting fading" $ do specEval "ᵏᵚ{ᵑ{įŋ+}f" - [ ("[]", All False ["0"]) - , ("[[1,1]]", All False ["1"]) - , ("[[1,2],[2,1],[2,2],[2,3],[3,2]]", All False ["2"]) + [ ("[]", all_ ["0"]) + , ("[[1,1]]", all_ ["1"]) + , ("[[1,2],[2,1],[2,2],[2,3],[3,2]]", all_ ["2"]) ] describe "q260472: Find Index of Rational Number in Calkin-Wilf Sequence" $ do specEval "ˡ{ŗ←£þ+_" - [ ("1", All False ["1"]) - , ("1/3", All False ["4"]) - , ("4/3", All False ["9"]) - , ("3/4", All False ["14"]) - , ("53/37", All False ["1081"]) - , ("37/53", All False ["1990"]) + [ ("1", all_ ["1"]) + , ("1/3", all_ ["4"]) + , ("4/3", all_ ["9"]) + , ("3/4", all_ ["14"]) + , ("53/37", all_ ["1081"]) + , ("37/53", all_ ["1990"]) ] describe "q260804: Minkowski's ?(x) for rational x" $ do specEval "ᶦ{1%ŗ}kaC$∫←:_Ë£d§+ṇ$çlÐ" - [ ("0/1", All False ["[0,0]"]) - , ("1/1", All False ["[1,0]"]) - , ("1/2", All False ["[1,1]"]) - , ("-1/2", All False ["[-1,1]"]) - , ("2/1", All False ["[2,0]"]) - , ("1/3", All False ["[1,2]"]) - , ("1/8", All False ["[1,7]"]) - , ("2/5", All False ["[3,3]"]) - , ("8/5", All False ["[13,3]"]) - , ("58/27", All False ["[1033,9]"]) - , ("30/73", All False ["[399,10]"]) - , ("144/89", All False ["[853,9]"]) - , ("-17/77", All False ["[-767,13]"]) - , ("-17/99", All False ["[-133,12]"]) - , ("355/113", All False ["[12648447,22]"]) - , ("16000/1", All False ["[16000,0]"]) + [ ("0/1", all_ ["[0,0]"]) + , ("1/1", all_ ["[1,0]"]) + , ("1/2", all_ ["[1,1]"]) + , ("-1/2", all_ ["[-1,1]"]) + , ("2/1", all_ ["[2,0]"]) + , ("1/3", all_ ["[1,2]"]) + , ("1/8", all_ ["[1,7]"]) + , ("2/5", all_ ["[3,3]"]) + , ("8/5", all_ ["[13,3]"]) + , ("58/27", all_ ["[1033,9]"]) + , ("30/73", all_ ["[399,10]"]) + , ("144/89", all_ ["[853,9]"]) + , ("-17/77", all_ ["[-767,13]"]) + , ("-17/99", all_ ["[-133,12]"]) + , ("355/113", all_ ["[12648447,22]"]) + , ("16000/1", all_ ["[16000,0]"]) ] describe "q260811: Given 4 fence lengths, what's the largest rectangular yard you can make?" $ do specEval "o;*ṁ" - [ ("[1,1,1,1]", All False ["1"]) - , ("[1,2,3,4]", All False ["3"]) - , ("[4,3,2,1]", All False ["3"]) - , ("[90,1,2,1]", All False ["2"]) - , ("[1,90,1,1]", All False ["1"]) - , ("[44,51,50,36]", All False ["1800"]) - , ("[3,3,3,3]", All False ["9"]) - , ("[3,3,3,4]", All False ["9"]) - , ("[3,4,3,4]", All False ["12"]) - , ("[4,4,3,4]", All False ["12"]) - , ("[4,4,4,4]", All False ["16"]) + [ ("[1,1,1,1]", all_ ["1"]) + , ("[1,2,3,4]", all_ ["3"]) + , ("[4,3,2,1]", all_ ["3"]) + , ("[90,1,2,1]", all_ ["2"]) + , ("[1,90,1,1]", all_ ["1"]) + , ("[44,51,50,36]", all_ ["1800"]) + , ("[3,3,3,3]", all_ ["9"]) + , ("[3,3,3,4]", all_ ["9"]) + , ("[3,4,3,4]", all_ ["12"]) + , ("[4,4,3,4]", all_ ["12"]) + , ("[4,4,4,4]", all_ ["16"]) ] specEval "oĭ$∏" - [ ("[1,1,1,1]", All False ["1"]) - , ("[1,2,3,4]", All False ["3"]) - , ("[4,3,2,1]", All False ["3"]) - , ("[90,1,2,1]", All False ["2"]) - , ("[1,90,1,1]", All False ["1"]) - , ("[44,51,50,36]", All False ["1800"]) - , ("[3,3,3,3]", All False ["9"]) - , ("[3,3,3,4]", All False ["9"]) - , ("[3,4,3,4]", All False ["12"]) - , ("[4,4,3,4]", All False ["12"]) - , ("[4,4,4,4]", All False ["16"]) + [ ("[1,1,1,1]", all_ ["1"]) + , ("[1,2,3,4]", all_ ["3"]) + , ("[4,3,2,1]", all_ ["3"]) + , ("[90,1,2,1]", all_ ["2"]) + , ("[1,90,1,1]", all_ ["1"]) + , ("[44,51,50,36]", all_ ["1800"]) + , ("[3,3,3,3]", all_ ["9"]) + , ("[3,3,3,4]", all_ ["9"]) + , ("[3,4,3,4]", all_ ["12"]) + , ("[4,4,3,4]", all_ ["12"]) + , ("[4,4,4,4]", all_ ["16"]) ] describe "q260966: sum of a range of a sum of a range of n" $ do specEval "R∑R∑" - [ ("1", All False ["1"]) - , ("2", All False ["6"]) - , ("3", All False ["21"]) - , ("4", All False ["55"]) - , ("5", All False ["120"]) - , ("6", All False ["231"]) - , ("7", All False ["406"]) - , ("8", All False ["666"]) - , ("9", All False ["1035"]) - , ("10", All False ["1540"]) + [ ("1", all_ ["1"]) + , ("2", all_ ["6"]) + , ("3", all_ ["21"]) + , ("4", all_ ["55"]) + , ("5", all_ ["120"]) + , ("6", all_ ["231"]) + , ("7", all_ ["406"]) + , ("8", all_ ["666"]) + , ("9", all_ ["1035"]) + , ("10", all_ ["1540"]) ] describe "q261325: Output endless powers of 2" $ do specEval "ŇË" - [("", All True ["1", "2", "4", "8", "16", "32", "64", "128", "256", "512", "1024"])] + [("", truncate_ ["1", "2", "4", "8", "16", "32", "64", "128", "256", "512", "1024"])] describe "q261861: Lowest digit addition generator" $ do specEval "ᵏ{:Ɗ∑+=" - [ ("0", All False ["0"]) - , ("29", All False ["19"]) - , ("216", All False ["198"]) + [ ("0", all_ ["0"]) + , ("29", all_ ["19"]) + , ("216", all_ ["198"]) ] describe "q261908: Last odd digit of power of 2" $ do specEval @@ -2573,32 +2592,32 @@ testEval = describe "Evaluation" $ do describe "q262032: Vertices of a regular dodecahedron" $ do specEval "7Ƃ89\\55:ŗÐçxŘ~?ŋ" - [ ("", All True ["[1,1,1]", "[1,1,-1]", "[1,-1,1]", "[1,-1,-1]"]) + [ ("", truncate_ ["[1,1,1]", "[1,1,-1]", "[1,-1,1]", "[1,-1,-1]"]) , ("", Count 20) ] describe "q262140: XOR of independent Bernoulli variables" $ do specEval "Ä←_∏←_ä" - [ ("[123/1000]", All False ["123/1000"]) - , ("[123/1000, 1/2]", All False ["1/2"]) - , ("[0,0,1,1,0,1]", All False ["1"]) - , ("[0,0,1,1,0,1,1/2]", All False ["1/2"]) - , ("[3/4,3/4]", All False ["3/8"]) - , ("[3/4,3/4,3/4]", All False ["9/16"]) + [ ("[123/1000]", all_ ["123/1000"]) + , ("[123/1000, 1/2]", all_ ["1/2"]) + , ("[0,0,1,1,0,1]", all_ ["1"]) + , ("[0,0,1,1,0,1,1/2]", all_ ["1/2"]) + , ("[3/4,3/4]", all_ ["3/8"]) + , ("[3/4,3/4,3/4]", all_ ["9/16"]) ] describe "q262159: Minimum partition with non-empty intersections" $ do specEval "Oᵖᵐ{Ťđṁ<}aş" - [ ("[]", All False ["[]"]) - , ("[[0,1]]", All False ["[[[0,1]]]"]) - , ("[[0,1],[2,3]]", All False ["[[[2,3]],[[0,1]]]"]) - , ("[[1,2],[0,3]]", All False ["[[[1,2],[0,3]]]"]) - , ("[[0,2],[1,3]]", All False ["[[[0,2],[1,3]]]"]) - , ("[[1,2],[3,4],[0,5]]", All False ["[[[3,4],[0,5]],[[1,2]]]", "[[[1,2],[0,5]],[[3,4]]]"]) - , ("[[0,1],[4,5],[2,3]]", All False ["[[[2,3]],[[4,5]],[[0,1]]]"]) - , ("[[4,5],[1,2],[0,3]]", All False ["[[[1,2],[0,3]],[[4,5]]]"]) - , ("[[0,1],[2,5],[3,4]]", All False ["[[[2,5],[3,4]],[[0,1]]]"]) - , ("[[0,2],[3,5],[1,4]]", All False ["[[[3,5],[1,4]],[[0,2]]]", "[[[0,2],[1,4]],[[3,5]]]"]) + [ ("[]", all_ ["[]"]) + , ("[[0,1]]", all_ ["[[[0,1]]]"]) + , ("[[0,1],[2,3]]", all_ ["[[[2,3]],[[0,1]]]"]) + , ("[[1,2],[0,3]]", all_ ["[[[1,2],[0,3]]]"]) + , ("[[0,2],[1,3]]", all_ ["[[[0,2],[1,3]]]"]) + , ("[[1,2],[3,4],[0,5]]", all_ ["[[[3,4],[0,5]],[[1,2]]]", "[[[1,2],[0,5]],[[3,4]]]"]) + , ("[[0,1],[4,5],[2,3]]", all_ ["[[[2,3]],[[4,5]],[[0,1]]]"]) + , ("[[4,5],[1,2],[0,3]]", all_ ["[[[1,2],[0,3]],[[4,5]]]"]) + , ("[[0,1],[2,5],[3,4]]", all_ ["[[[2,5],[3,4]],[[0,1]]]"]) + , ("[[0,2],[3,5],[1,4]]", all_ ["[[[3,5],[1,4]],[[0,2]]]", "[[[0,2],[1,4]],[[3,5]]]"]) ] describe "q262347: Reversed Squares" $ do specEval @@ -2616,20 +2635,20 @@ testEval = describe "Evaluation" $ do describe "q262512: Generate all linked chains" $ do specEval "\"-_\"Ňŧĉᵗz'=ᵚcjt" - [("", All True ["-=_", "_=-", "--=_", "-=_=-", "-=__", "_=--", "_=-=_", "__=-"])] + [("", truncate_ ["-=_", "_=-", "--=_", "-=_=-", "-=__", "_=--", "_=-=_", "__=-"])] describe "q262518: Landmine Number I" $ do specEval "ᵉpttᵋ+*:,,$Ĉ" - [ ("[1,8,3,7,1] 4", All False ["2"]) - , ("[2,9,2,8,0,6,4] 4", All False ["4"]) - , ("[3,3,3,3,3] 9", All False ["6"]) - , ("[9,9,9,9,9,9,9,9,9,9] 100", All False ["0"]) - , ("[1,2,3,4,5,6,7,8,9,0] 8", All False ["4"]) - , ("[2,2,2,2,2] 4", All False ["9"]) - , ("[0,0,0,0,0,0,0,0,0,0,0,0,0,0] 0", All False ["36"]) - , ("[1,2,9,5,1] 10", All False ["4"]) - , ("[1,2,3,1,2,3,1,2,3,1,2,3] 3", All False ["11"]) - , ("[8,2,8,8,2,8,8,2,8] 16", All False ["11"]) + [ ("[1,8,3,7,1] 4", all_ ["2"]) + , ("[2,9,2,8,0,6,4] 4", all_ ["4"]) + , ("[3,3,3,3,3] 9", all_ ["6"]) + , ("[9,9,9,9,9,9,9,9,9,9] 100", all_ ["0"]) + , ("[1,2,3,4,5,6,7,8,9,0] 8", all_ ["4"]) + , ("[2,2,2,2,2] 4", all_ ["9"]) + , ("[0,0,0,0,0,0,0,0,0,0,0,0,0,0] 0", all_ ["36"]) + , ("[1,2,9,5,1] 10", all_ ["4"]) + , ("[1,2,3,1,2,3,1,2,3,1,2,3] 3", all_ ["11"]) + , ("[8,2,8,8,2,8,8,2,8] 16", all_ ["11"]) ] describe "q262588: Measure the Diamond Road" $ do specEval @@ -2654,61 +2673,61 @@ testEval = describe "Evaluation" $ do describe "q262647: Sum of a range of a sum of a range of a sum of a range of a sum of a range of a sum of" $ do specEval "ᵑ{R∑" - [ ("0", All False ["0"]) - , ("1", All False ["1"]) - , ("2", All False ["6"]) - , ("3", All False ["231"]) - , ("4", All False ["1186570"]) + [ ("0", all_ ["0"]) + , ("1", all_ ["1"]) + , ("2", all_ ["6"]) + , ("3", all_ ["231"]) + , ("4", all_ ["1186570"]) ] describe "q262809: Diagonalize a vector" $ do specEval "x:ᵒ-¬*" - [ ("[]", All False ["[]"]) - , ("[0]", All False ["[[0]]"]) - , ("[1]", All False ["[[1]]"]) - , ("[1,2,3]", All False ["[[1,0,0],[0,2,0],[0,0,3]]"]) - , ("[1,0,2,3]", All False ["[[1,0,0,0],[0,0,0,0],[0,0,2,0],[0,0,0,3]]"]) + [ ("[]", all_ ["[]"]) + , ("[0]", all_ ["[[0]]"]) + , ("[1]", all_ ["[[1]]"]) + , ("[1,2,3]", all_ ["[[1,0,0],[0,2,0],[0,0,3]]"]) + , ("[1,0,2,3]", all_ ["[[1,0,0,0],[0,0,0,0],[0,0,2,0],[0,0,0,3]]"]) ] describe "q262868: Chamber of Reflection" $ do specEval "Ðᵒ÷u#←" - [ ("5 4 11", All False ["4"]) - , ("1 1 10", All False ["9"]) - , ("100 100 1", All False ["0"]) - , ("3 2 9", All False ["5"]) - , ("6 3 18", All False ["5"]) - , ("1 1 100", All False ["99"]) - , ("2398 2308 4", All False ["0"]) - , ("500 10000 502", All False ["1"]) + [ ("5 4 11", all_ ["4"]) + , ("1 1 10", all_ ["9"]) + , ("100 100 1", all_ ["0"]) + , ("3 2 9", all_ ["5"]) + , ("6 3 18", all_ ["5"]) + , ("1 1 100", all_ ["99"]) + , ("2398 2308 4", all_ ["0"]) + , ("500 10000 502", all_ ["1"]) ] describe "q262985: Numbers that can be negated by reading backwards" $ do specEval "3Ňŧ←1cƀ_=3b" - [("", All True ["2", "8", "20", "26", "32", "56", "80", "104", "146", "164"])] + [("", truncate_ ["2", "8", "20", "26", "32", "56", "80", "104", "146", "164"])] describe "q263200: Print all Polynomials" $ do specEval "Ňƒ$ƥ←$yĦŋ" - [("", All True ["0", "[1]", "[-1]", "[0,1]", "[0,-1]", "[2]", "[-2]", "[0,0,1]", "[0,0,-1]"])] + [("", truncate_ ["0", "[1]", "[-1]", "[0,1]", "[0,-1]", "[2]", "[-2]", "[0,0,1]", "[0,0,-1]"])] describe "q263308: Make a k-skip-j range" $ do specEval "+ᵚ%-±ç1Ĩ" - [ ("1 1 11", All False ["1", "3", "5", "7", "9", "11"]) - , ("2 13 19", All False ["1", "2", "16", "17"]) - , ("2 13 16", All False ["1", "2", "16"]) - , ("1 4 49", All False ["1", "6", "11", "16", "21", "26", "31", "36", "41", "46"]) - , ("2 4 22", All False ["1", "2", "7", "8", "13", "14", "19", "20"]) - , ("2 10 13", All False ["1", "2", "13"]) - , ("5 15 10", All False ["1", "2", "3", "4", "5"]) - , ("1 13 27", All False ["1", "15"]) - , ("7 4 31", All False ["1", "2", "3", "4", "5", "6", "7", "12", "13", "14", "15", "16", "17", "18", "23", "24", "25", "26", "27", "28", "29"]) - , ("99 99 1", All False ["1"]) + [ ("1 1 11", all_ ["1", "3", "5", "7", "9", "11"]) + , ("2 13 19", all_ ["1", "2", "16", "17"]) + , ("2 13 16", all_ ["1", "2", "16"]) + , ("1 4 49", all_ ["1", "6", "11", "16", "21", "26", "31", "36", "41", "46"]) + , ("2 4 22", all_ ["1", "2", "7", "8", "13", "14", "19", "20"]) + , ("2 10 13", all_ ["1", "2", "13"]) + , ("5 15 10", all_ ["1", "2", "3", "4", "5"]) + , ("1 13 27", all_ ["1", "15"]) + , ("7 4 31", all_ ["1", "2", "3", "4", "5", "6", "7", "12", "13", "14", "15", "16", "17", "18", "23", "24", "25", "26", "27", "28", "29"]) + , ("99 99 1", all_ ["1"]) ] describe "q263364: Compute this fractal matrix" $ do specEval "Ë:ᵒ&Þ←A±" - [ ("1", All False ["[[1,1],[1,0]]"]) - , ("2", All False ["[[1,1,1,1],[1,0,1,0],[1,1,0,0],[1,0,0,1]]"]) - , ("3", All False ["[[1,1,1,1,1,1,1,1],[1,0,1,0,1,0,1,0],[1,1,0,0,1,1,0,0],[1,0,0,1,1,0,0,1],[1,1,1,1,0,0,0,0],[1,0,1,0,0,1,0,1],[1,1,0,0,0,0,1,1],[1,0,0,1,0,1,1,1]]"]) + [ ("1", all_ ["[[1,1],[1,0]]"]) + , ("2", all_ ["[[1,1,1,1],[1,0,1,0],[1,1,0,0],[1,0,0,1]]"]) + , ("3", all_ ["[[1,1,1,1,1,1,1,1],[1,0,1,0,1,0,1,0],[1,1,0,0,1,1,0,0],[1,0,0,1,1,0,0,1],[1,1,1,1,0,0,0,0],[1,0,1,0,0,1,0,1],[1,1,0,0,0,0,1,1],[1,0,0,1,0,1,1,1]]"]) ] describe "q263438: Is this a powerful number?" $ do specEval @@ -2748,13 +2767,13 @@ testEval = describe "Evaluation" $ do ] specEval "xᵒĈ:§#ᵑ{ˣᵐ∙+}±≈j∑" - [ ("[[],[],[]]", All False ["0"]) - , ("[[1],[0]]", All False ["2"]) - , ("[[1],[0],[]]", All False ["2"]) - , ("[[1],[0,2],[]]", All False ["3"]) - , ("[[2],[],[1,0],[2]]", All False ["5"]) - , ("[[1,2,3],[2,3],[3],[]]", All False ["0"]) - , ("[[1],[2],[3],[4],[5],[0]]", All False ["30"]) + [ ("[[],[],[]]", all_ ["0"]) + , ("[[1],[0]]", all_ ["2"]) + , ("[[1],[0],[]]", all_ ["2"]) + , ("[[1],[0,2],[]]", all_ ["3"]) + , ("[[2],[],[1,0],[2]]", all_ ["5"]) + , ("[[1,2,3],[2,3],[3],[]]", all_ ["0"]) + , ("[[1],[2],[3],[4],[5],[0]]", all_ ["30"]) ] describe "q263627: Is this set laminar?" $ do specEval @@ -2773,7 +2792,7 @@ testEval = describe "Evaluation" $ do describe "q263678: The all-high powerful numbers" $ do specEval "Ňᵖ{Rƒᵐ∏Ɔ<" - [("", All True ["1", "4", "8", "16", "32", "64", "128", "144", "216", "288", "432", "864"])] + [("", truncate_ ["1", "4", "8", "16", "32", "64", "128", "144", "216", "288", "432", "864"])] describe "q263774: Round up to a smoother number" $ do specEval "Ň+ᵖ{ʷ½≥" @@ -2784,12 +2803,12 @@ testEval = describe "Evaluation" $ do describe "q263910: Evenly spread values" $ do specEval "kŢᵉR→/+j" - [("[1/10,2/10,14/10,23/10,24/10,25/10,32/10]", All False ["[1/3,2/3,3/2,9/4,5/2,11/4,7/2]"])] + [("[1/10,2/10,14/10,23/10,24/10,25/10,32/10]", all_ ["[1/3,2/3,3/2,9/4,5/2,11/4,7/2]"])] describe "q264102: Iterate over all non-equivalent strings" $ do specEval "r:,↕ũ∆Zç∫:ux=¿'a+H" - [ ("2", All False ["abab"]) - , ("3", All False ["abcabc", "abcacb", "abcbac", "abcbca", "abacbc"]) + [ ("2", all_ ["abab"]) + , ("3", all_ ["abcabc", "abcacb", "abcbac", "abcbca", "abacbc"]) ] describe "q264166: Count N-Rich Permutations of an Integer Sequence" $ do specEval @@ -2823,26 +2842,26 @@ testEval = describe "Evaluation" $ do describe "q264502: Otteretto Classic game scoring method" $ do specEval "pNᵉ#ĉ#*" - [ ("\"A\"", All False ["1"]) - , ("\"ABA\"", All False ["1", "4", "9"]) - , ("\"DDDD\"", All False ["1", "2", "3", "4"]) - , ("\"AABAA\"", All False ["1", "2", "6", "12", "15"]) - , ("\"CABAC\"", All False ["1", "4", "9", "16", "25"]) - , ("\"EBBBE\"", All False ["1", "4", "6", "8", "15"]) - , ("\"DEBBBE\"", All False ["1", "4", "9", "12", "15", "24"]) - , ("\"CCAABBA\"", All False ["1", "2", "6", "8", "15", "18", "28"]) + [ ("\"A\"", all_ ["1"]) + , ("\"ABA\"", all_ ["1", "4", "9"]) + , ("\"DDDD\"", all_ ["1", "2", "3", "4"]) + , ("\"AABAA\"", all_ ["1", "2", "6", "12", "15"]) + , ("\"CABAC\"", all_ ["1", "4", "9", "16", "25"]) + , ("\"EBBBE\"", all_ ["1", "4", "6", "8", "15"]) + , ("\"DEBBBE\"", all_ ["1", "4", "9", "12", "15", "24"]) + , ("\"CCAABBA\"", all_ ["1", "2", "6", "8", "15", "18", "28"]) ] describe "q264505: Repeat your program to print Fibonacci numbers" $ do specEval "ˣ+1I" - [("", All False ["1"])] + [("", all_ ["1"])] describe "q264589: Multiply multivariate polynomials" $ do specEval "×" - [ ("[1,1,1] [1,1,1]", All False ["[1,2,3,2,1]"]) - , ("[[0,1],[1]] [[0,1],[1]]", All False ["[[0,0,1],[0,2],[1]]"]) - , ("[[[0,1],[1]],[[1]]] [[[0,1],[-1]],[[1]]]", All False ["[[[0,0,1],[0,0],[-1]],[[0,2],[0]],[[1]]]"]) - , ("[[],[[[[[[[[[1]]]]]]]]]] [[],[[[[[[[[[1]]]]]]]]]]", All False ["[[],[],[[[[[[[[[1]]]]]]]]]]"]) + [ ("[1,1,1] [1,1,1]", all_ ["[1,2,3,2,1]"]) + , ("[[0,1],[1]] [[0,1],[1]]", all_ ["[[0,0,1],[0,2],[1]]"]) + , ("[[[0,1],[1]],[[1]]] [[[0,1],[-1]],[[1]]]", all_ ["[[[0,0,1],[0,0],[-1]],[[0,2],[0]],[[1]]]"]) + , ("[[],[[[[[[[[[1]]]]]]]]]] [[],[[[[[[[[[1]]]]]]]]]]", all_ ["[[],[],[[[[[[[[[1]]]]]]]]]]"]) ] describe "q264624: Is it a canonical elementary CA rule number?" $ do specEval @@ -2861,69 +2880,106 @@ testEval = describe "Evaluation" $ do describe "q264733: Convert a Gaussian integer to its positive form" $ do specEval "±đZ≠nŘA" - [ ("[0,0]", All False ["[0,0]"]) - , ("[5,0]", All False ["[5,0]"]) - , ("[0,2]", All False ["[2,0]"]) - , ("[1,1]", All False ["[1,1]"]) - , ("[1,-1]", All False ["[1,1]"]) - , ("[3,-5]", All False ["[5,3]"]) - , ("[-3,5]", All False ["[5,3]"]) - , ("[3,5]", All False ["[3,5]"]) - , ("[-3,-5]", All False ["[3,5]"]) + [ ("[0,0]", all_ ["[0,0]"]) + , ("[5,0]", all_ ["[5,0]"]) + , ("[0,2]", all_ ["[2,0]"]) + , ("[1,1]", all_ ["[1,1]"]) + , ("[1,-1]", all_ ["[1,1]"]) + , ("[3,-5]", all_ ["[5,3]"]) + , ("[-3,5]", all_ ["[5,3]"]) + , ("[3,5]", all_ ["[3,5]"]) + , ("[-3,-5]", all_ ["[3,5]"]) ] describe "q264903: Order by Earliest Lower Digit" $ do specEval "ᶾ-¥b±" - [ ("\"999\" \"999\"", All False ["0"]) - , ("\"116\" \"115\"", All False ["-1"]) - , ("\"115\" \"116\"", All False ["1"]) - , ("\"789\" \"870\"", All False ["1"]) - , ("\"3333\" \"33\"", All False ["0"]) - , ("\"33\" \"3333\"", All False ["0"]) - , ("\"2100\" \"20\"", All False ["-1"]) - , ("\"1200\" \"19\"", All False ["1"]) - , ("\"20\" \"2100\"", All False ["1"]) - , ("\"19\" \"1200\"", All False ["-1"]) - , ("\"1234\" \"1234\"", All False ["0"]) - , ("\"5432\" \"4321\"", All False ["-1"]) - , ("\"5432\" \"5678\"", All False ["1"]) - , ("\"998\" \"99\"", All False ["0"]) - , ("\"1233999999\" \"12345000\"", All False ["1"]) + [ ("\"999\" \"999\"", all_ ["0"]) + , ("\"116\" \"115\"", all_ ["-1"]) + , ("\"115\" \"116\"", all_ ["1"]) + , ("\"789\" \"870\"", all_ ["1"]) + , ("\"3333\" \"33\"", all_ ["0"]) + , ("\"33\" \"3333\"", all_ ["0"]) + , ("\"2100\" \"20\"", all_ ["-1"]) + , ("\"1200\" \"19\"", all_ ["1"]) + , ("\"20\" \"2100\"", all_ ["1"]) + , ("\"19\" \"1200\"", all_ ["-1"]) + , ("\"1234\" \"1234\"", all_ ["0"]) + , ("\"5432\" \"4321\"", all_ ["-1"]) + , ("\"5432\" \"5678\"", all_ ["1"]) + , ("\"998\" \"99\"", all_ ["0"]) + , ("\"1233999999\" \"12345000\"", all_ ["1"]) ] describe "q264918: Sum of consecutive nth powers" $ do specEval "←ᶠ{ᵈqEů∑=" - [ ("1", All False ["[]"]) - , ("2", All False ["[]"]) - , ("3", All False ["[]"]) - , ("4", All False ["[2]"]) - , ("5", All False ["[]"]) - , ("6", All False ["[2]"]) - , ("7", All False ["[2]"]) - , ("8", All False ["[2]"]) - , ("9", All False ["[3]"]) - , ("10", All False ["[]"]) + [ ("1", all_ ["[]"]) + , ("2", all_ ["[]"]) + , ("3", all_ ["[]"]) + , ("4", all_ ["[2]"]) + , ("5", all_ ["[]"]) + , ("6", all_ ["[2]"]) + , ("7", all_ ["[2]"]) + , ("8", all_ ["[2]"]) + , ("9", all_ ["[3]"]) + , ("10", all_ ["[]"]) ] specEval "←ᶠ{ƵBƶ:o=" - [ ("1", All False ["[]"]) - , ("2", All False ["[]"]) - , ("3", All False ["[]"]) - , ("4", All False ["[2]"]) - , ("5", All False ["[]"]) - , ("6", All False ["[2]"]) - , ("7", All False ["[2]"]) - , ("8", All False ["[2]"]) - , ("9", All False ["[3]"]) - , ("10", All False ["[]"]) + [ ("1", all_ ["[]"]) + , ("2", all_ ["[]"]) + , ("3", all_ ["[]"]) + , ("4", all_ ["[2]"]) + , ("5", all_ ["[]"]) + , ("6", all_ ["[2]"]) + , ("7", all_ ["[2]"]) + , ("8", all_ ["[2]"]) + , ("9", all_ ["[3]"]) + , ("10", all_ ["[]"]) ] describe "q265088: Longest Consecutive Sequence" $ do specEval "ˡ{N→v∩" - [ ("[100,4,200,1,3,2]", All False ["4"]) - , ("[1,2,3,4,5]", All False ["5"]) - , ("[10,9,8,7,6,5]", All False ["6"]) - , ("[1,1,1,2,3]", All False ["3"]) - , ("[5]", All False ["1"]) - , ("[7,3,9,5,4,2,8]", All False ["4"]) + [ ("[100,4,200,1,3,2]", all_ ["4"]) + , ("[1,2,3,4,5]", all_ ["5"]) + , ("[10,9,8,7,6,5]", all_ ["6"]) + , ("[1,1,1,2,3]", all_ ["3"]) + , ("[5]", all_ ["1"]) + , ("[7,3,9,5,4,2,8]", all_ ["4"]) + ] + describe "q265768: Transpose a multidimensional array" $ do + specEval + "ʷ∑→ᵉbD" + [ ("[[1]]", all_ ["[[1]]"]) + , ("[[[[1,2]]]]", all_ ["[[[[1],[2]]]]"]) + , ("[[1,2,3],[4,5,6]]", all_ ["[[1,4],[2,5],[3,6]]"]) + , ("[[[1,2],[3,4]],[[5,6],[7,8]]]", all_ ["[[[1,5],[2,6]],[[3,7],[4,8]]]"]) + , ("[[[[9]],[[10]]]]", all_ ["[[[[9]]],[[[10]]]]"]) + , ("[[[1,2,3],[4,5,6]],[[7,8,9],[10,11,12]]]", all_ ["[[[1,7],[2,8],[3,9]],[[4,10],[5,11],[6,12]]]"]) + ] + describe "q265869: Diagonal Binary Sequence" $ do + specEval + "ᶦ{Ƃ2ŗɔƃ3M" + [ ("1", truncate_ ["1", "3", "5", "9", "17", "33", "65", "129", "257", "513"]) + , ("2", truncate_ ["2", "4", "8", "16", "32", "64", "128", "256", "512", "1024"]) + , ("3", truncate_ ["3", "5", "9", "17", "33", "65", "129", "257", "513", "1025"]) + , ("6", truncate_ ["6", "10", "18", "34", "66", "130", "258", "514", "1026", "2050"]) + , ("7", truncate_ ["7", "11", "19", "35", "67", "131", "259", "515", "1027", "2051"]) + , ("12", truncate_ ["12", "20", "36", "68", "132", "260", "516", "1028", "2052", "4100"]) + , ("31", truncate_ ["31", "47", "79", "143", "271", "527", "1039", "2063", "4111", "8207"]) + , ("89", truncate_ ["89", "153", "281", "537", "1049", "2073", "4121", "8217", "16409", "32793"]) + , ("111", truncate_ ["111", "175", "303", "559", "1071", "2095", "4143", "8239", "16431", "32815"]) + , ("1000", truncate_ ["1000", "1512", "2536", "4584", "8680", "16872", "33256", "66024", "131560", "262632"]) + ] + describe "q265918: Divisor chain counts (1 3 3 7 ...)" $ do + specEval + "ĎSᵉti¦" + [ ("1", Count 1) + , ("2", Count 3) + , ("3", Count 3) + , ("4", Count 7) + , ("5", Count 3) + , ("6", Count 11) + , ("7", Count 3) + , ("8", Count 15) + , ("9", Count 7) ]