
19 Jun
2008
19 Jun
'08
2:36 p.m.
2008/6/19 jinjing
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ï