[Haskell-cafe] message passing style in Monad

jinjing nfjinjing at gmail.com
Wed Sep 10 09:14:28 EDT 2008


I found that as I can do

  xs.map(+1).sort

by redefine . to be

  a . f = f a
  infixl 9 .

I can also do

  readFile "readme.markdown" <.> lines <.> length

by making

  a <.> b = a .liftM b
  infixl 9 <.>

Kinda annoying, but the option is there.

- jinjing


More information about the Haskell-Cafe mailing list