On Sun, Feb 15, 2009 at 9:47 AM, Heinrich Apfelmus
<apfel...@quantentunnel.de> wrote:
> It's fair, but may duplicate elements, i.e. it doesn't necessarily
> create a permutation. For example,  rs  could be something like
>
>   rs = [5,3,3,3,2,4]
>

But our sort doesn't discard values when the keys are the same. For example,

[1,2,3,4] == map snd . sortBy (compare `on` fst) . zip (repeat 1) $ [1,2,3,4]

Nothing gets duplicated. Or did I miss something?

-- 
Felipe.
_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to