3 ms·
toUpper array := map (x => uppercase x) array Why not just `map uppercase array` ? That way you don't even really need to define a function `toUpper array`. Is
by spion 12y ago
toUpper array := map (x => uppercase x) array
Why not just `map uppercase array` ? That way you don't even really need to define a function `toUpper array`. Isn't it customary not to mix lifting and program logic in functional programming languages?
Filter example:
notPrefixedWithA name := not contains (prefix name) ["a", "A"]
then use
filter notPrefixedWithA names