Open dotnetCarpenter opened 4 years ago
This is syntactically correct:
String.filter (\c -> Char.isUpper c) pw |> String.isEmpty
And it means the same thing as:
String.filter Char.isUpper pw |> String.isEmpty
Either way, that error message could be better! :+1:
Lambda or anonymous function for
String.filter
orString.map
always give me this weird error message.Whatever I am running into is confusing me a lot! Normally I can give fairly specific hints, but something is really tripping me up this time.
The surrounding code is the following:
It looks to me that
is the exact same as the body of the
test
function, ifpredicate
is replaced with\c -> Char.isUpper c
. I have tried to add parentheses around the lambda but that just give me other error messages.I'm new, so it might not always be an error but I have only ever got an error message when I try.
Anyway, the reason for this issue is: Whatever I am running into is confusing me a lot! Normally I can give fairly specific hints, but something is really tripping me up this time.