encode :: Eq a => [a] -> [(Int, a)]
encode = map (\x -> (length x, head x)) . group
encode :: Eq a => [a] -> [(Int, a)]
encode = map (\x -> (length x, head x)) . group
encode = map (\x -> (length x, head x)) . group