Anton
Posted on May 15, 2019
Again a challenge from 99 Elm problems
Convert a list to a list of lists where repeated elements of the source list are packed into sublists. Elements that are not repeated should be placed in a one element sublist.
pack [1,1,1,2,3,3,3,4,4,4,4,5,6,6] ==
[ [1,1,1]
, [2]
, [3, 3, 3]
, [4, 4, 4, 4]
, [5]
, [6, 6]
]
💖 💪 🙅 🚩
Anton
Posted on May 15, 2019
Join Our Newsletter. No Spam, Only the good stuff.
Sign up to receive the latest update from our blog.