sort  =  sort ls = merge (sort p) (sort q) where (p, q) = split ls
In fact, this function has a bug.
It never returns
(Except when the input is empty.)
(In which case it does return a list of type [a])
Type checking found an infinite loop bug!
|Next||Copyright © 1999,2008 Mark Dominus|