2008/6/19 jinjing <[EMAIL PROTECTED]>:
> 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

-- 
Jedaï
_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to