4 ms·
I saw a similar version in erlang (in Joe Armstrong's Programming Erlang) and agree it beautifully illustrates the concept of quicksort. Apparently, Tony Hoare
by hyperpallium 7y ago
I saw a similar version in erlang (in Joe Armstrong's Programming Erlang) and agree it beautifully illustrates the concept of quicksort. Apparently, Tony Hoare came up with it when he took a class teaching him recursion (i.e. he was a student).
But the flaw you note unfortunately undermines performance... the "quick" in "quicksort".
Thus, IMHO it's a compelling illustration of the profound strengths and weaknesses of fp.