I'm a Haskell newbie, so please excuse me if you find this question trivial:
How would I get GHCi to accept a declaration of this sort: let foo = fmap (*3) . fmap (+10)
?
I tried adding a type declaration to foo (let foo :: [Int] -> [Int] =
etc) to make the functor type explicit but the compiler responds Illegal Signature
.
Thanks!
EDIT - Apparently there are quite a few ways to do this. I picked Tikhon's answer because his was among the first, and also fairly intuitive. Thanks, everyone!