diff --git a/exercises/practice/luhn/.meta/examples/luhn.example.u b/exercises/practice/luhn/.meta/examples/luhn.example.u index 5cb71a9..1cb1045 100644 --- a/exercises/practice/luhn/.meta/examples/luhn.example.u +++ b/exercises/practice/luhn/.meta/examples/luhn.example.u @@ -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) diff --git a/exercises/practice/luhn/.meta/testAnnotation.json b/exercises/practice/luhn/.meta/testAnnotation.json index 82980b3..d195ef5 100644 --- a/exercises/practice/luhn/.meta/testAnnotation.json +++ b/exercises/practice/luhn/.meta/testAnnotation.json @@ -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\"" } -] \ No newline at end of file +]