[Haskell-cafe] Re: message passing style in Monad

jinjing nfjinjing at gmail.com
Wed Sep 10 09:22:27 EDT 2008


sorry about the confusion, too much drinks.
I used the redefined . in the difination of <.>. it should really just be

  flip liftM

On Wed, Sep 10, 2008 at 9:14 PM, jinjing <nfjinjing at gmail.com> wrote:
> 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