[Haskell-cafe] Re: Re-order type (flip map)
Johannes Waldmann
waldmann at imn.htwk-leipzig.de
Sun Oct 10 17:32:16 EDT 2010
> "The student has accidental given the arguments of map in the wrong order"
I am using "for = flip map" a lot, in code like
for [ 1 .. 10 ] $ \ i -> ...
in fact that's one of my "most dearly missed" Prelude functions.
Note that we have Control.Monad.forM
forM [ 1 .. 10 ] $ \ i -> do ...
Oh, and while we're at it - are there standard notations
for "forward" function composition and application?
I mean instead of h . g . f $ x
I'd sometimes prefer x ? f ? g ? h
but what are the "?"
J.W.
More information about the Haskell-Cafe
mailing list