[Haskell-beginners] fmap fmap

Tony Morris tonymorris at gmail.com
Tue Aug 4 23:29:51 EDT 2009


Michael P Mossey wrote:
> How does one write
>
> fmap (fmap (*2)) xs
>
> without parenthesis? (Using . and $ instead.)
>
> I don't really understand . and $ well enough I guess. I tried a bunch
> of stuff but nothing worked.
>
> -Mike
> _______________________________________________
> Beginners mailing list
> Beginners at haskell.org
> http://www.haskell.org/mailman/listinfo/beginners
>
fmap . fmap $ (*2)

or perhaps:

(fmap . fmap) (*2)

-- 
Tony Morris
http://tmorris.net/




More information about the Beginners mailing list