Skip to content

Commit

Permalink
luhn-exercise: Small changes
Browse files Browse the repository at this point in the history
  • Loading branch information
SimaDovakin committed Jul 15, 2024
1 parent 1bbd91d commit bafd1b2
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion exercises/practice/luhn/.meta/examples/luhn.example.u
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ luhn.isValid string =
charList = toCharList string
digitCharList = List.filter (Class.is Class.digit) charList
match (charList |> any (not << isValidChar), 1 >= size digitCharList) with
(false, false) -> List.filter (Class.is Class.digit) charList
(false, false) -> digitCharList
|> map toDigit
|> checkSum
|> (s -> 0 == mod s 10)
Expand Down
2 changes: 1 addition & 1 deletion exercises/practice/luhn/.meta/testAnnotation.json
Original file line number Diff line number Diff line change
Expand Up @@ -87,4 +87,4 @@
"name": "luhn.isValid.tests.ex22",
"test_code": "expect (false == luhn.isValid \"59%59\")\n |> Test.label \"non-numeric, non-space char in the middle with a sum that's divisible by 10 isn't allowed\""
}
]
]

0 comments on commit bafd1b2

Please sign in to comment.