News for hackers. Stuff that matters.
Re:Tree Oriented Programming [pdf] by jacobparker on Monday April 24, 2017 @07:57AM (#14183501)
Yeah, I wasn't being very generous. However, naming the function "qsort" is pretty dishonest. I agree that the proper quick-sort implementation is going to look pretty imperative (and involve mutation) which is why I get a bit annoyed at fake-quick-sort being used to demo how pretty FP makes your code...

(I agree that this implementation is neat. I think it's a great way to explain sorting.)

(naive qsort is O(n^2) in the worst case (with pivot selection it is Theta(nlogn), though,) but the functional-linked-list-sort is O(n^2) in all cases... :))

There are no comments on this comment yet.