Follow

Prelude> import Data.List
Prelude Data.List> (map (\xs -> (head xs, (length xs))) . group) "aaaabbbcca"
[('a',4),('b',3),('c',2),('a',1)]

twitter.com/Al_Grigor/status/1

Sign in to participate in the conversation
Fosstodon

Fosstodon is an English speaking Mastodon instance that is open to anyone who is interested in technology; particularly free & open source software.