[Haskell-beginners] repetition

Thomas Davie tom.davie at gmail.com
Thu Aug 4 11:39:18 CEST 2011


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