[Haskell-beginners] repetition
Thomas Davie
tom.davie at gmail.com
Thu Aug 4 11:33:32 CEST 2011
On 4 Aug 2011, at 10:31, Luca Ciciriello wrote:
> Hi All.
> Is there any function in Prelude that removes the repeated elements in a list?
>
> In example I've a list like this one: xs = ["3","3","3","3","3","4","4","4","4","4","5","5","5","5","5","6","6","6","6","6","6","6"]
>
> I need a function f such that f xs = ["3","4","5","6"]
>
> thanks in advance for any answer.
map head . group
Bob
More information about the Beginners
mailing list