[Haskell-cafe] Time consumption nub

Stefan Holdermans stefan at cs.uu.nl
Wed Jul 18 08:31:52 EDT 2007


Arie,

> Ok, so when do I use nub instead of 'map head.group.sort' ?

Well, for one thing, |map head . group . sort| produces a sorted  
list, wheras |nub| preserves the order of the input list.

Cheers,

   Stefan


More information about the Haskell-Cafe mailing list