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

Reply via email to