On Tue, Jul 28, 2009 at 6:47 AM, Sebastian
Fischer<s...@informatik.uni-kiel.de> wrote:
>>> perms = sortByM (const [True,False])
> Hence, perm as defined above can yield a list that contains all permutations
> of the input (at least once) regardless of the sorting algorithm.
>
> Where is the hitch?

The algorithm might diverge when given a non-transitive comparison
operator.  On Spore we had a bug where a NaN got into a list of floats
we were sorting and our quicksort corrupted the heap because < isn't
transitive on lists with NaNs.

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

Reply via email to