Re:What I Wish I Knew When Learning Haskell
by zests on Saturday April 11, 2020 @09:41AM
(#22841610)
Both of your questions have the same answer. (x:xs) means x is the first element and xs is the rest.
Re:What I Wish I Knew When Learning Haskell
by magicalhippo on Saturday April 11, 2020 @11:01AM
(#22841998)
Aha! Thanks.
Obviously picking first element as pivot makes for a very poor Quicksort. Though I presume a better approach, say median of first, mid and last elements, would add but an extra line?
edit: also, how is the pivot element selected there?