[Haskell-beginners] fmap fmap
Felipe Lessa
felipe.lessa at gmail.com
Tue Aug 4 21:16:08 EDT 2009
On Tue, Aug 04, 2009 at 06:02:29PM -0700, Michael P Mossey wrote:
> How does one write
>
> fmap (fmap (*2)) xs
>
> without parenthesis? (Using . and $ instead.)
fmap (fmap (*2)) xs
flip fmap xs (fmap (*2))
flip fmap xs $ fmap (*2)
flip fmap xs $ fmap (\x -> (*) x 2)
flip fmap xs $ fmap (\x -> flip (*) 2 x)
flip fmap xs $ fmap (flip (*) 2)
flip fmap xs $ fmap $ flip (*) 2
--
Felipe.
More information about the Beginners
mailing list