[Haskell-beginners] Better way to write this?
rk at trie.org
Tue Mar 9 15:33:11 EST 2010
>However, the solution given uses notation that confuses my
>little mind. Can someone point me to a good resource on this
> myLength :: [a] -> Int myLength = foldr (\x n -> n + 1) 0
"\x n -> n + 1" in the above is an anonymous function.
More information about the Beginners