[Haskell-cafe] message passing style like in Haskell?

Chaddaï Fouché chaddai.fouche at gmail.com
Thu Jun 19 14:36:05 EDT 2008

2008/6/19 jinjing <nfjinjing at gmail.com>:
> encode xs = xs.group.map token where token x = (x.length, x.head)

Working in this direction is a question of taste, but the choice of
the dot for the operator is a pretty bad idea...

On the other hand, my favourite would be :

encode = map (length &&& head) . group


More information about the Haskell-Cafe mailing list