3 ms·
I did it this way: map (head &&& length) . group (Although in an actual full program, there would be other considerations (what considerations those are dep
by zzo38computer 6y ago
I did it this way:
map (head &&& length) . group
(Although in an actual full program, there would be other considerations (what considerations those are depends on the program being written), and in a full program I probably would not be using Haskell, but rather C.)