[Haskell-beginners] fmap fmap

Jason Dusek jason.dusek at gmail.com
Tue Aug 4 21:49:38 EDT 2009

2009/08/04 Michael P Mossey <mpm at alumni.caltech.edu>:
> fmap (fmap (*2)) xs

  Not exactly what you asked for:

    fmap (*2) `fmap` xs

  Operator sections -- the `(*2)` -- require parens. Using
  backticks helps you clean up parenthesis.

Jason Dusek

More information about the Beginners mailing list