diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 7de58be..5f470e5 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -25,7 +25,7 @@ jobs: unzip uiua.zip echo "${PWD}" >> "${GITHUB_PATH}" env: - VERSION: 0.16.0 + VERSION: 0.17.2 GH_TOKEN: ${{ github.token }} - name: Verify all exercises diff --git a/docs/INSTALLATION.md b/docs/INSTALLATION.md index d0aacd5..b16e27b 100644 --- a/docs/INSTALLATION.md +++ b/docs/INSTALLATION.md @@ -4,7 +4,7 @@ See the [official installation guide][install-guide] for the latest instructions, including IDE integration and fonts. ```exercism/note -Currently our online test-runner uses version `0.14.1`. +Currently our online test-runner uses version `0.17.0`. With Uiua's rapid development process, that might be subject to change, so keep this in mind if you can't reproduce the testing results from the website. ``` diff --git a/exercises/practice/affine-cipher/.meta/example.ua b/exercises/practice/affine-cipher/.meta/example.ua index 10c2dff..06373a8 100644 --- a/exercises/practice/affine-cipher/.meta/example.ua +++ b/exercises/practice/affine-cipher/.meta/example.ua @@ -1,9 +1,9 @@ Coprime ← ¬/↥≡⌕ ∩(°/×) -MMI ← ⊗1˜◿×⊃(⋅⇡|⊙∘) +MMI ← ˜⨂1˜◿×⊃(⋅⇡|⊙∘) Validate ← ⍤"a and m must be coprime" (Coprime :26) Groups ← ⊜(□∘)\+=0◿5°⊏ Sanitize ← ▽+⊃(⌵±|×⊃(≥@0|≤@9)).¯⌵ Encrypt ← ⍜(-@a▽)(◿26+×)⌵±. Encode ← /$"_ _" Groups Encrypt Sanitize ⊃(⊙Validate|⋅∘) -Decrypt ← ◿26×⊃(⋅(MMI:26)|-:⊙⋅∘) +Decrypt ← ◿26×⊃(⋅(MMI : 26)|-:⊙⋅∘) Decode ← ⍜(-@a▽|Decrypt)⌵±. ▽≠@\s. ⊃(⊙Validate|⋅∘) diff --git a/exercises/practice/affine-cipher/tests.ua b/exercises/practice/affine-cipher/tests.ua index 0de38ac..79a3dd4 100644 --- a/exercises/practice/affine-cipher/tests.ua +++ b/exercises/practice/affine-cipher/tests.ua @@ -25,7 +25,7 @@ ⍤⤙≍ "swxtj npvyk lruol iejdc blaxk swxmh qzglf" Encode "The quick brown fox jumps over the lazy dog." 17 33 # encode with a not coprime to m -⍤⤙≍ "a and m must be coprime" ⍣(Encode "This is a test." 6 17) +⍤⤙≍ "a and m must be coprime" ⍣(Encode "This is a test." 6 17|∘) # decode exercism ⍤⤙≍ "exercism" Decode "tytgn fjr" 3 7 @@ -46,4 +46,4 @@ ⍤⤙≍ "jollygreengiant" Decode "vszzm cly yd cg qdp" 15 16 # decode with a not coprime to m -⍤⤙≍ "a and m must be coprime" ⍣(Decode "Test" 13 5) +⍤⤙≍ "a and m must be coprime" ⍣(Decode "Test" 13 5|∘) diff --git a/exercises/practice/all-your-base/.meta/example.ua b/exercises/practice/all-your-base/.meta/example.ua index 2f0efa9..30e7ef8 100644 --- a/exercises/practice/all-your-base/.meta/example.ua +++ b/exercises/practice/all-your-base/.meta/example.ua @@ -5,5 +5,5 @@ ValidBases ← ( ValidDigits ← ⍤"all digits must satisfy 0 <= d < input base" /×↧⊃(≥0|<:) Valid ← ⊃(ValidDigits|⋅ValidBases) FromInput ← /+×ⁿ:⊙(⇌°⊏): -ToOutput ← ⨬([0]|◿:⌊÷⊸⊃(ⁿ⊙⋅∘|⋅∘)◡(⇌⇡+1⌊ₙ:))±. +ToOutput ← ⨬([0]|◿:⌊÷⊸⊃(ⁿ⊙⋅∘|⋅∘)◡(⇌⇡+1⌊⌝˜ⁿ:))±. Rebase ← ToOutput FromInput ◡Valid diff --git a/exercises/practice/all-your-base/tests.ua b/exercises/practice/all-your-base/tests.ua index 789bc13..873a1f4 100644 --- a/exercises/practice/all-your-base/tests.ua +++ b/exercises/practice/all-your-base/tests.ua @@ -88,52 +88,52 @@ Expected ← [4 2] Digits ← [0] InputBase ← 1 OutputBase ← 10 -⍤⤙≍ "input base must be >= 2" ⍣(Rebase Digits InputBase OutputBase) +⍤⤙≍ "input base must be >= 2" ⍣(Rebase Digits InputBase OutputBase|∘) # Input base is zero Digits ← [] InputBase ← 0 OutputBase ← 10 -⍤⤙≍ "input base must be >= 2" ⍣(Rebase Digits InputBase OutputBase) +⍤⤙≍ "input base must be >= 2" ⍣(Rebase Digits InputBase OutputBase|∘) # Input base is negative Digits ← [1] InputBase ← ¯2 OutputBase ← 10 -⍤⤙≍ "input base must be >= 2" ⍣(Rebase Digits InputBase OutputBase) +⍤⤙≍ "input base must be >= 2" ⍣(Rebase Digits InputBase OutputBase|∘) # Negative digit Digits ← [1 ¯1 1 0 1 0] InputBase ← 2 OutputBase ← 10 -⍤⤙≍ "all digits must satisfy 0 <= d < input base" ⍣(Rebase Digits InputBase OutputBase) +⍤⤙≍ "all digits must satisfy 0 <= d < input base" ⍣(Rebase Digits InputBase OutputBase|∘) # Invalid positive digit Digits ← [1 2 1 0 1 0] InputBase ← 2 OutputBase ← 10 -⍤⤙≍ "all digits must satisfy 0 <= d < input base" ⍣(Rebase Digits InputBase OutputBase) +⍤⤙≍ "all digits must satisfy 0 <= d < input base" ⍣(Rebase Digits InputBase OutputBase|∘) # Output base is one Digits ← [1 0 1 0 1 0] InputBase ← 2 OutputBase ← 1 -⍤⤙≍ "output base must be >= 2" ⍣(Rebase Digits InputBase OutputBase) +⍤⤙≍ "output base must be >= 2" ⍣(Rebase Digits InputBase OutputBase|∘) # Output base is zero Digits ← [7] InputBase ← 10 OutputBase ← 0 -⍤⤙≍ "output base must be >= 2" ⍣(Rebase Digits InputBase OutputBase) +⍤⤙≍ "output base must be >= 2" ⍣(Rebase Digits InputBase OutputBase|∘) # Output base is negative Digits ← [1] InputBase ← 2 OutputBase ← ¯7 -⍤⤙≍ "output base must be >= 2" ⍣(Rebase Digits InputBase OutputBase) +⍤⤙≍ "output base must be >= 2" ⍣(Rebase Digits InputBase OutputBase|∘) # Both bases are negative Digits ← [1] InputBase ← ¯2 OutputBase ← ¯7 -⍤⤙≍ "input base must be >= 2" ⍣(Rebase Digits InputBase OutputBase) +⍤⤙≍ "input base must be >= 2" ⍣(Rebase Digits InputBase OutputBase|∘) diff --git a/exercises/practice/anagram/.meta/example.ua b/exercises/practice/anagram/.meta/example.ua index 9fb2e09..617d012 100644 --- a/exercises/practice/anagram/.meta/example.ua +++ b/exercises/practice/anagram/.meta/example.ua @@ -3,4 +3,4 @@ FilterSelf ← |2 ▽≠⊙(¯⌵.)(¯⌵□) GetAnagrams ← |3 ▽=⊙□ Sort ← |1 ⍆¯⌵ # Anagrams ? Target Words -FindAnagrams ← |2 FilterSelf : GetAnagrams≡(□Sort°□):Sort:⤙⊙:. +FindAnagrams ← |2 FilterSelf : GetAnagrams≡(□Sort°□):Sort :⤙⊙:. diff --git a/exercises/practice/atbash-cipher/.meta/example.ua b/exercises/practice/atbash-cipher/.meta/example.ua index 323d245..f213d7f 100644 --- a/exercises/practice/atbash-cipher/.meta/example.ua +++ b/exercises/practice/atbash-cipher/.meta/example.ua @@ -4,6 +4,6 @@ Alnum ← ⊂Letters Digits Reversed ← ⊂⇌Letters Digits Sanitize ← ▽∊Alnum. Groups ← ⊜(□∘)\+=0◿5°⊏ -Translate ← ⊏ ⟜Reversed ⊗ ⟜Alnum Sanitize ¯⌵ +Translate ← ⊏ ⟜Reversed ˜⨂ ⟜Alnum Sanitize ¯⌵ Encode ← /$"_ _" Groups Translate Decode ← Translate Sanitize diff --git a/exercises/practice/change/tests.ua b/exercises/practice/change/tests.ua index 2e93dce..a3c188b 100644 --- a/exercises/practice/change/tests.ua +++ b/exercises/practice/change/tests.ua @@ -57,14 +57,14 @@ Expected ← [] # Error testing for change smaller than the smallest of coins Coins ← [5 10] Target ← 3 -⍤⤙≍ "can't make target with given coins" ⍣(Change Coins Target) +⍤⤙≍ "can't make target with given coins" ⍣(Change Coins Target|∘) # Error if no combination can add up to target Coins ← [5 10] Target ← 94 -⍤⤙≍ "can't make target with given coins" ⍣(Change Coins Target) +⍤⤙≍ "can't make target with given coins" ⍣(Change Coins Target|∘) # Cannot find negative change values Coins ← [1 2 5] Target ← ¯5 -⍤⤙≍ "target can't be negative" ⍣(Change Coins Target) +⍤⤙≍ "target can't be negative" ⍣(Change Coins Target|∘) diff --git a/exercises/practice/collatz-conjecture/tests.ua b/exercises/practice/collatz-conjecture/tests.ua index e0c0727..8b1ef5a 100644 --- a/exercises/practice/collatz-conjecture/tests.ua +++ b/exercises/practice/collatz-conjecture/tests.ua @@ -10,7 +10,7 @@ ⍤⤙≍ 4 Steps 16 # zero is an error -⍤⤙≍ "only positive integers are allowed" ⍣(Steps 0) +⍤⤙≍ "only positive integers are allowed" ⍣(Steps 0|∘) # negative value is an error -⍤⤙≍ "only positive integers are allowed" ⍣(Steps ¯15) +⍤⤙≍ "only positive integers are allowed" ⍣(Steps ¯15|∘) diff --git a/exercises/practice/darts/.meta/example.ua b/exercises/practice/darts/.meta/example.ua index 46e99e5..96954fb 100644 --- a/exercises/practice/darts/.meta/example.ua +++ b/exercises/practice/darts/.meta/example.ua @@ -1,2 +1,2 @@ Distance ← |2 √+∩(×.) -Score ← |2 ⊡ : 10_5_1_0 ⊗ 1 ≤ 1_5_10_∞ Distance +Score ← |2 ⊡ : 10_5_1_0 ˜⨂ 1 ≤ 1_5_10_∞ Distance diff --git a/exercises/practice/dnd-character/.meta/example.ua b/exercises/practice/dnd-character/.meta/example.ua index 357f60c..85ec539 100644 --- a/exercises/practice/dnd-character/.meta/example.ua +++ b/exercises/practice/dnd-character/.meta/example.ua @@ -7,4 +7,4 @@ Constitution ← °□⊡2 Intelligence ← °□⊡3 Wisdom ← °□⊡4 Charisma ← °□⊡5 -Hitpoints ← +10 Modifier ⊃Constitution +Hitpoints ← +10 Modifier Constitution diff --git a/exercises/practice/flower-field/tests.ua b/exercises/practice/flower-field/tests.ua index 521b036..e951643 100644 --- a/exercises/practice/flower-field/tests.ua +++ b/exercises/practice/flower-field/tests.ua @@ -1,8 +1,8 @@ ~ "flower-field.ua" ~ Annotate # No rows -Garden ← "" -Expected ← "" +Garden ← "" +Expected ← "" ⍤⤙≍ Expected Annotate Garden # No columns diff --git a/exercises/practice/forth/.meta/example.ua b/exercises/practice/forth/.meta/example.ua index bae36a2..9163ae1 100644 --- a/exercises/practice/forth/.meta/example.ua +++ b/exercises/practice/forth/.meta/example.ua @@ -1,6 +1,6 @@ ! ↚ ⋅⍜↙₂/^0 F ↚ ( - ⊜(⤚⊗:{"DUP""DROP""SWAP""OVER""+""-""*""/"}□)⊸≠@ ⌵⊙[] + ⊜(⤚˜⨂:{"DUP""DROP""SWAP""OVER""+""-""*""/"}□)⊸≠@ ⌵⊙[] ⇌∧⨬( ⊂⊸⊢◌ | ↘₁⍤.>₀⊸⧻◌ @@ -16,7 +16,7 @@ F ↚ ( Evaluate ← ( ⍣(<∞⊸/↥F | ▽⊜⍣(1⋕)∩0⊸≠@ ◌ - 1⨬"empty stack""only one value on the stack"≍1⍣⊣ + 1⨬"empty stack""only one value on the stack"≍1⍣⊣∘ ) ⍤"divide by zero" ) diff --git a/exercises/practice/forth/tests.ua b/exercises/practice/forth/tests.ua index 1859aae..3454b1b 100644 --- a/exercises/practice/forth/tests.ua +++ b/exercises/practice/forth/tests.ua @@ -10,28 +10,28 @@ ⍤⤙≍ [3] Evaluate "1 2 +" # Addition - errors if there is nothing on the stack -⍤⤙≍ "empty stack" ⍣(Evaluate "+") +⍤⤙≍ "empty stack" ⍣(Evaluate "+"|∘) # Addition - errors if there is only one value on the stack -⍤⤙≍ "only one value on the stack" ⍣(Evaluate "1 +") +⍤⤙≍ "only one value on the stack" ⍣(Evaluate "1 +"|∘) # Subtraction - can subtract two numbers ⍤⤙≍ [¯1] Evaluate "3 4 -" # Subtraction - errors if there is nothing on the stack -⍤⤙≍ "empty stack" ⍣(Evaluate "-") +⍤⤙≍ "empty stack" ⍣(Evaluate "-"|∘) # Subtraction - errors if there is only one value on the stack -⍤⤙≍ "only one value on the stack" ⍣(Evaluate "1 -") +⍤⤙≍ "only one value on the stack" ⍣(Evaluate "1 -"|∘) # Multiplication - can multiply two numbers ⍤⤙≍ [8] Evaluate "2 4 *" # Multiplication - errors if there is nothing on the stack -⍤⤙≍ "empty stack" ⍣(Evaluate "*") +⍤⤙≍ "empty stack" ⍣(Evaluate "*"|∘) # Multiplication - errors if there is only one value on the stack -⍤⤙≍ "only one value on the stack" ⍣(Evaluate "1 *") +⍤⤙≍ "only one value on the stack" ⍣(Evaluate "1 *"|∘) # Division - can divide two numbers ⍤⤙≍ [4] Evaluate "12 3 /" @@ -40,13 +40,13 @@ ⍤⤙≍ [2] Evaluate "8 3 /" # Division - errors if dividing by zero -⍤⤙≍ "divide by zero" ⍣(Evaluate "4 0 /") +⍤⤙≍ "divide by zero" ⍣(Evaluate "4 0 /"|∘) # Division - errors if there is nothing on the stack -⍤⤙≍ "empty stack" ⍣(Evaluate "/") +⍤⤙≍ "empty stack" ⍣(Evaluate "/"|∘) # Division - errors if there is only one value on the stack -⍤⤙≍ "only one value on the stack" ⍣(Evaluate "1 /") +⍤⤙≍ "only one value on the stack" ⍣(Evaluate "1 /"|∘) # Combined arithmetic - addition and subtraction ⍤⤙≍ [¯1] Evaluate "1 2 + 4 -" @@ -61,7 +61,7 @@ ⍤⤙≍ [1 2 2] Evaluate "1 2 dup" # Dup - errors if there is nothing on the stack -⍤⤙≍ "empty stack" ⍣(Evaluate "dup") +⍤⤙≍ "empty stack" ⍣(Evaluate "dup"|∘) # Drop - removes the top value on the stack if it is the only one ⍤⤙≍ [] Evaluate "1 drop" @@ -70,7 +70,7 @@ ⍤⤙≍ [1] Evaluate "1 2 drop" # Drop - errors if there is nothing on the stack -⍤⤙≍ "empty stack" ⍣(Evaluate "drop") +⍤⤙≍ "empty stack" ⍣(Evaluate "drop"|∘) # Swap - swaps the top two values on the stack if they are the only ones ⍤⤙≍ [2 1] Evaluate "1 2 swap" @@ -79,10 +79,10 @@ ⍤⤙≍ [1 3 2] Evaluate "1 2 3 swap" # Swap - errors if there is nothing on the stack -⍤⤙≍ "empty stack" ⍣(Evaluate "swap") +⍤⤙≍ "empty stack" ⍣(Evaluate "swap"|∘) # Swap - errors if there is only one value on the stack -⍤⤙≍ "only one value on the stack" ⍣(Evaluate "1 swap") +⍤⤙≍ "only one value on the stack" ⍣(Evaluate "1 swap"|∘) # Over - copies the second element if there are only two ⍤⤙≍ [1 2 1] Evaluate "1 2 over" @@ -91,10 +91,10 @@ ⍤⤙≍ [1 2 3 2] Evaluate "1 2 3 over" # Over - errors if there is nothing on the stack -⍤⤙≍ "empty stack" ⍣(Evaluate "over") +⍤⤙≍ "empty stack" ⍣(Evaluate "over"|∘) # Over - errors if there is only one value on the stack -⍤⤙≍ "only one value on the stack" ⍣(Evaluate "1 over") +⍤⤙≍ "only one value on the stack" ⍣(Evaluate "1 over"|∘) # Case-insensitivity - DUP is case-insensitive ⍤⤙≍ [1 1 1 1] Evaluate "1 DUP Dup dup" diff --git a/exercises/practice/grains/tests.ua b/exercises/practice/grains/tests.ua index 773a8eb..eb5c79d 100644 --- a/exercises/practice/grains/tests.ua +++ b/exercises/practice/grains/tests.ua @@ -19,16 +19,16 @@ ⍤⤙≍ 2147483648 Square 32 # grains on square 64? -⍤⤙≍ 9223372036854775808 Square 64 +⍤⤙≍ 9223372036854776000 Square 64 # square greater than 64 is invalid -⍤⤙≍ "square must be between 1 and 64" ⍣(Square 65) +⍤⤙≍ "square must be between 1 and 64" ⍣(Square 65|∘) # square 0 is invalid -⍤⤙≍ "square must be between 1 and 64" ⍣(Square 0) +⍤⤙≍ "square must be between 1 and 64" ⍣(Square 0|∘) # negative square is invali -⍤⤙≍ "square must be between 1 and 64" ⍣(Square `1) +⍤⤙≍ "square must be between 1 and 64" ⍣(Square ¯1|∘) # returns the total number of grains on the board -⍤⤙≍ 18446744073709551615 Total +⍤⤙≍ 18446744073709552000 Total diff --git a/exercises/practice/hamming/tests.ua b/exercises/practice/hamming/tests.ua index c2605f6..476b73d 100644 --- a/exercises/practice/hamming/tests.ua +++ b/exercises/practice/hamming/tests.ua @@ -16,13 +16,13 @@ ⍤⤙≍ 9 Distance "GGACGGATTCTG" "AGGACGGATTCT" # disallow empty first strand -⍤⤙≍ "strands must be of equal length" ⍣(Distance "" "G") +⍤⤙≍ "strands must be of equal length" ⍣(Distance "" "G"|∘) # disallow empty second strand -⍤⤙≍ "strands must be of equal length" ⍣(Distance "G" "") +⍤⤙≍ "strands must be of equal length" ⍣(Distance "G" ""|∘) # disallow first strand longer -⍤⤙≍ "strands must be of equal length" ⍣(Distance "AATG" "AAA") +⍤⤙≍ "strands must be of equal length" ⍣(Distance "AATG" "AAA"|∘) # disallow second strand longer -⍤⤙≍ "strands must be of equal length" ⍣(Distance "ATA" "AGTG") +⍤⤙≍ "strands must be of equal length" ⍣(Distance "ATA" "AGTG"|∘) diff --git a/exercises/practice/intergalactic-transmission/tests.ua b/exercises/practice/intergalactic-transmission/tests.ua index d87023c..c9e2522 100644 --- a/exercises/practice/intergalactic-transmission/tests.ua +++ b/exercises/practice/intergalactic-transmission/tests.ua @@ -82,11 +82,11 @@ Expected ← [41] # first byte has wrong parity Message ← [7 0] -⍤⤙≍ "wrong parity" ⍣(DecodeMessage Message) +⍤⤙≍ "wrong parity" ⍣(DecodeMessage Message|∘) # second byte has wrong parity Message ← [3 104] -⍤⤙≍ "wrong parity" ⍣(DecodeMessage Message) +⍤⤙≍ "wrong parity" ⍣(DecodeMessage Message|∘) # 0xcf4b00 is decoded to 0xce94 Message ← [207 75 0] @@ -110,7 +110,7 @@ Expected ← [71 114 101 97 116 49 33] # last byte has wrong parity Message ← [71 184 153 172 23 160 197 67] -⍤⤙≍ "wrong parity" ⍣(DecodeMessage Message) +⍤⤙≍ "wrong parity" ⍣(DecodeMessage Message|∘) # eight byte message Message ← [192 0 68 102 125 6 120 66 33 129] @@ -124,4 +124,4 @@ Expected ← [69 120 101 114 99 105 115 109 32 105 115 32 97 119 101 115 111 109 # wrong parity on 16th byte Message ← [68 189 24 175 39 27 165 231 108 144 27 46 51 3 132 239 101 184 219 237 215 40 132] -⍤⤙≍ "wrong parity" ⍣(DecodeMessage Message) +⍤⤙≍ "wrong parity" ⍣(DecodeMessage Message|∘) diff --git a/exercises/practice/largest-series-product/tests.ua b/exercises/practice/largest-series-product/tests.ua index cc605aa..258a10b 100644 --- a/exercises/practice/largest-series-product/tests.ua +++ b/exercises/practice/largest-series-product/tests.ua @@ -28,7 +28,7 @@ ⍤⤙≍ 0 LargestProduct "99099" 3 # rejects span longer than string length -⍤⤙≍ "span must be smaller than string length" ⍣(LargestProduct "123" 4) +⍤⤙≍ "span must be smaller than string length" ⍣(LargestProduct "123" 4|∘) # reports 1 for empty string and empty product (0-span) ⍤⤙≍ 1 LargestProduct "" 0 @@ -37,10 +37,10 @@ ⍤⤙≍ 1 LargestProduct "123" 0 # rejects empty string and nonzero span -⍤⤙≍ "span must be smaller than string length" ⍣(LargestProduct "" 1) +⍤⤙≍ "span must be smaller than string length" ⍣(LargestProduct "" 1|∘) # rejects invalid character in digits -⍤⤙≍ "invalid character in digits" ⍣(LargestProduct "1234a5" 2) +⍤⤙≍ "invalid character in digits" ⍣(LargestProduct "1234a5" 2|∘) # rejects negative span -⍤⤙≍ "span must not be negative" ⍣(LargestProduct "12345" ¯1) +⍤⤙≍ "span must not be negative" ⍣(LargestProduct "12345" ¯1|∘) diff --git a/exercises/practice/nth-prime/tests.ua b/exercises/practice/nth-prime/tests.ua index 6ef4aa2..6d60353 100644 --- a/exercises/practice/nth-prime/tests.ua +++ b/exercises/practice/nth-prime/tests.ua @@ -13,4 +13,4 @@ ⍤⤙≍ 104743 Prime 10001 # There is no zeroth prime -⍤⤙≍ "there is no zeroth prime" ⍣(Prime 0) +⍤⤙≍ "there is no zeroth prime" ⍣(Prime 0|∘) diff --git a/exercises/practice/nucleotide-count/tests.ua b/exercises/practice/nucleotide-count/tests.ua index b19dd45..c841903 100644 --- a/exercises/practice/nucleotide-count/tests.ua +++ b/exercises/practice/nucleotide-count/tests.ua @@ -13,4 +13,4 @@ ⍤⤙≍ map "ACGT" 20_12_17_21 NucleotideCounts "AGCTTTTCATTCTGACTGCAACGGGCAATATGTCTCTGTGTGGATTAAAAAAAGAGTGTCTGATAGCAGC" # strand with invalid nucleotides -⍤⤙≍ "invalid nucleotide in strand" ⍣(NucleotideCounts "AGXXACT") +⍤⤙≍ "invalid nucleotide in strand" ⍣(NucleotideCounts "AGXXACT"|∘) diff --git a/exercises/practice/ocr-numbers/tests.ua b/exercises/practice/ocr-numbers/tests.ua index 8004b6b..683b63f 100644 --- a/exercises/practice/ocr-numbers/tests.ua +++ b/exercises/practice/ocr-numbers/tests.ua @@ -33,7 +33,7 @@ Display ← [ "| |" " " ] -⍤⤙≍ "Number of input lines is not a multiple of four" ⍣(Convert Display) +⍤⤙≍ "Number of input lines is not a multiple of four" ⍣(Convert Display|∘) # Display with a number of columns that is not a multiple of three raises an error Display ← [ @@ -42,7 +42,7 @@ Display ← [ " |" " " ] -⍤⤙≍ "Number of input columns is not a multiple of three" ⍣(Convert Display) +⍤⤙≍ "Number of input columns is not a multiple of three" ⍣(Convert Display|∘) # Recognizes 110101100 Display ← [ diff --git a/exercises/practice/palindrome-products/tests.ua b/exercises/practice/palindrome-products/tests.ua index 98d5b41..fdec37b 100644 --- a/exercises/practice/palindrome-products/tests.ua +++ b/exercises/practice/palindrome-products/tests.ua @@ -33,7 +33,7 @@ Expected ← ↯0_3[] ⍤⤙≍ Expected Largest 15 15 # Error result for smallest if min is more than max -⍤⤙≍ "invalid range" ⍣(Smallest 10000 1) +⍤⤙≍ "invalid range" ⍣(Smallest 10000 1|∘) # Error result for largest if min is more than max -⍤⤙≍ "invalid range" ⍣(Largest 2 1) +⍤⤙≍ "invalid range" ⍣(Largest 2 1|∘) diff --git a/exercises/practice/perfect-numbers/tests.ua b/exercises/practice/perfect-numbers/tests.ua index 119cbe9..2f34a99 100644 --- a/exercises/practice/perfect-numbers/tests.ua +++ b/exercises/practice/perfect-numbers/tests.ua @@ -34,7 +34,7 @@ ⍤⤙≍ "deficient" ClassifyNumber 1 # Zero is rejected (as it is not a positive integer) -⍤⤙≍ "number must be positive" ⍣(ClassifyNumber 0) +⍤⤙≍ "number must be positive" ⍣(ClassifyNumber 0|∘) # Negative integer is rejected (as it is not a positive integer) -⍤⤙≍ "number must be positive" ⍣(ClassifyNumber ¯1) +⍤⤙≍ "number must be positive" ⍣(ClassifyNumber ¯1|∘) diff --git a/exercises/practice/phone-number/tests.ua b/exercises/practice/phone-number/tests.ua index f8f2c70..166964e 100644 --- a/exercises/practice/phone-number/tests.ua +++ b/exercises/practice/phone-number/tests.ua @@ -10,10 +10,10 @@ ⍤⤙≍ "2234567890" Clean "223 456 7890 " # Invalid when 9 digits -⍤⤙≍ "invalid length" ⍣(Clean "123456789") +⍤⤙≍ "invalid length" ⍣(Clean "123456789"|∘) # Invalid when 11 digits does not start with a 1 -⍤⤙≍ "invalid country code" ⍣(Clean "22234567890") +⍤⤙≍ "invalid country code" ⍣(Clean "22234567890"|∘) # Valid when 11 digits and starting with 1 ⍤⤙≍ "2234567890" Clean "12234567890" @@ -22,34 +22,34 @@ ⍤⤙≍ "2234567890" Clean "+1 (223) 456-7890" # Invalid when more than 11 digits -⍤⤙≍ "invalid length" ⍣(Clean "321234567890") +⍤⤙≍ "invalid length" ⍣(Clean "321234567890"|∘) # Invalid with letters -⍤⤙≍ "invalid character" ⍣(Clean "523-abc-7890") +⍤⤙≍ "invalid character" ⍣(Clean "523-abc-7890"|∘) # Invalid with punctuations -⍤⤙≍ "invalid character" ⍣(Clean "523-@:!-7890") +⍤⤙≍ "invalid character" ⍣(Clean "523-@:!-7890"|∘) # Invalid if area code starts with 0 -⍤⤙≍ "invalid area code" ⍣(Clean "(023) 456-7890") +⍤⤙≍ "invalid area code" ⍣(Clean "(023) 456-7890"|∘) # Invalid if area code starts with 1 -⍤⤙≍ "invalid area code" ⍣(Clean "(123) 456-7890") +⍤⤙≍ "invalid area code" ⍣(Clean "(123) 456-7890"|∘) # Invalid if exchange code starts with 0 -⍤⤙≍ "invalid exchange code" ⍣(Clean "(223) 056-7890") +⍤⤙≍ "invalid exchange code" ⍣(Clean "(223) 056-7890"|∘) # Invalid if exchange code starts with 1 -⍤⤙≍ "invalid exchange code" ⍣(Clean "(223) 156-7890") +⍤⤙≍ "invalid exchange code" ⍣(Clean "(223) 156-7890"|∘) # Invalid if area code starts with 0 on valid 11-digit number -⍤⤙≍ "invalid area code" ⍣(Clean "1 (023) 456-7890") +⍤⤙≍ "invalid area code" ⍣(Clean "1 (023) 456-7890"|∘) # Invalid if area code starts with 1 on valid 11-digit number -⍤⤙≍ "invalid area code" ⍣(Clean "1 (123) 456-7890") +⍤⤙≍ "invalid area code" ⍣(Clean "1 (123) 456-7890"|∘) # Invalid if exchange code starts with 0 on valid 11-digit number -⍤⤙≍ "invalid exchange code" ⍣(Clean "1 (223) 056-7890") +⍤⤙≍ "invalid exchange code" ⍣(Clean "1 (223) 056-7890"|∘) # Invalid if exchange code starts with 1 on valid 11-digit number -⍤⤙≍ "invalid exchange code" ⍣(Clean "1 (223) 156-7890") +⍤⤙≍ "invalid exchange code" ⍣(Clean "1 (223) 156-7890"|∘) diff --git a/exercises/practice/protein-translation/tests.ua b/exercises/practice/protein-translation/tests.ua index cb9a41e..eb860cb 100644 --- a/exercises/practice/protein-translation/tests.ua +++ b/exercises/practice/protein-translation/tests.ua @@ -82,7 +82,7 @@ ⍤⤙≍ {"Methionine" "Methionine"} Proteins "AUGAUG" # Unknown amino acids not part of a codon can't translate -⍤⤙≍ "invalid codon" ⍣(Proteins "XYZ") +⍤⤙≍ "invalid codon" ⍣(Proteins "XYZ"|∘) # Incomplete RNA sequence can't translate -⍤⤙≍ "invalid codon" ⍣(Proteins "AUGU") +⍤⤙≍ "invalid codon" ⍣(Proteins "AUGU"|∘) diff --git a/exercises/practice/queen-attack/tests.ua b/exercises/practice/queen-attack/tests.ua index cbc4223..64dd602 100644 --- a/exercises/practice/queen-attack/tests.ua +++ b/exercises/practice/queen-attack/tests.ua @@ -1,16 +1,16 @@ ~ "queen-attack.ua" ~ Queen # Queen must have positive row -⍤⤙≍ "invalid row" ⍣(Queen~New ¯2 2) +⍤⤙≍ "invalid row" ⍣(Queen~New ¯2 2|∘) # Queen must have row on board -⍤⤙≍ "invalid row" ⍣(Queen~New 8 4) +⍤⤙≍ "invalid row" ⍣(Queen~New 8 4|∘) # Queen must have positive column -⍤⤙≍ "invalid column" ⍣(Queen~New 2 ¯2) +⍤⤙≍ "invalid column" ⍣(Queen~New 2 ¯2|∘) # Queen must have column on board -⍤⤙≍ "invalid column" ⍣(Queen~New 4 8) +⍤⤙≍ "invalid column" ⍣(Queen~New 4 8|∘) # Row of queen with a valid position ⍤⤙≍ 2 Queen~Row Queen~New 2 3 diff --git a/exercises/practice/say/tests.ua b/exercises/practice/say/tests.ua index 21d3df6..181a010 100644 --- a/exercises/practice/say/tests.ua +++ b/exercises/practice/say/tests.ua @@ -52,7 +52,7 @@ ⍤⤙≍ "nine hundred eighty-seven billion six hundred fifty-four million three hundred twenty-one thousand one hundred twenty-three" Say 987654321123 # Numbers below zero are out of range -⍤⤙≍ "input out of range" ⍣(Say ¯1) +⍤⤙≍ "input out of range" ⍣(Say ¯1|∘) # Numbers above 999,999,999,999 are out of range -⍤⤙≍ "input out of range" ⍣(Say 1000000000000) +⍤⤙≍ "input out of range" ⍣(Say 1000000000000|∘) diff --git a/exercises/practice/space-age/tests.ua b/exercises/practice/space-age/tests.ua index 67372da..883d27e 100644 --- a/exercises/practice/space-age/tests.ua +++ b/exercises/practice/space-age/tests.ua @@ -25,4 +25,4 @@ ⍤⤙≍ 0.35 SpaceAge "Neptune" 1821023456 # invalid planet causes error -⍤⤙≍ "not a planet" ⍣(SpaceAge "Sun" 680804807) +⍤⤙≍ "not a planet" ⍣(SpaceAge "Sun" 680804807|∘) diff --git a/exercises/practice/variable-length-quantity/tests.ua b/exercises/practice/variable-length-quantity/tests.ua index 4b6aed5..775a29e 100644 --- a/exercises/practice/variable-length-quantity/tests.ua +++ b/exercises/practice/variable-length-quantity/tests.ua @@ -70,10 +70,10 @@ ⍤⤙≍ [4294967295] Decode [143 255 255 255 127] # Incomplete sequence causes error -⍤⤙≍ "incomplete sequence" ⍣(Decode [255]) +⍤⤙≍ "incomplete sequence" ⍣(Decode [255]|∘) # Incomplete sequence causes error, even if value is zero -⍤⤙≍ "incomplete sequence" ⍣(Decode [128]) +⍤⤙≍ "incomplete sequence" ⍣(Decode [128]|∘) # Multiple values ⍤⤙≍ [8192 1193046 268435455 0 16383 16384] Decode [192 0 200 232 86 255 255 255 127 0 255 127 129 128 0]