I really wish flip is part of the core library...
flip : (a -> b -> c) -> (b -> a -> c)
flip f a b = f b a
squareSum : List Int -> Int
squareSum integers =
List.foldl (flip (^) 2 >> (+)) 0 integers
We're a place where coders share, stay up-to-date and grow their careers.
We strive for transparency and don't collect excess data.