[Haskell-beginners] repetition

Luca Ciciriello luca_ciciriello at hotmail.com
Thu Aug 4 11:44:31 CEST 2011


My mistake, I haven't specified that the starting list is ordered.

Luca
On Aug 4, 2011, at 11:39 AM, Thomas Davie wrote:

> 
> On 4 Aug 2011, at 10:36, Lyndon Maydwell wrote:
> 
>> nub
> 
> Heh, our differing answers point out an ambiguity in the question.
> 
> Luca, given [5,10,10,5] what is this function expected to produce?
> 
> if you want [5,10] then nub is correct.
> if you want [5,10,5] then map head . group is correct.
> 
> Bob
> 




More information about the Beginners mailing list