You forgot empty set. ;-)
oops. I just copied it without thinking about it. I appologize to anyone
caught in an endless quicksort loop.
> quicksort [] = []
> quicksort (x:xs) = quicksort [y|y<-xs,y<x]++[x]++quicksort [y|y<-xs,y>=x]
I wonder which is faster... doing <= first or doing >= last? Or
is there any difference? I'm too tired to think...
The second call to quicksort is not affected by the existance of the
first--they are both called on xs. Makes no diffence.
quicksort=: (($:@(<#[) , (=#[) , $:@(>#[)) ({~ [EMAIL PROTECTED])) ^: (1:<#)
Bless you! *hands core a tissue*
DarwinPorts is finally installing hugs98 now. Gah, what a waste of a day...
;)
Nick
_________________________________________________________________
Express yourself instantly with MSN Messenger! Download today - it's FREE!
http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/
_______________________________________________
RLUG mailing list
[email protected]
http://lists.rlug.org/mailman/listinfo/rlug