3 ms·
As dllthomas commented, 'p' would be better named "pivot". xs is just convention. A variable containing an arbitrary number is often called 'x', right? Well, a
by lostcolony 13y ago
As dllthomas commented, 'p' would be better named "pivot".
xs is just convention. A variable containing an arbitrary number is often called 'x', right? Well, a list of such things is plural, so xs.
So pattern match a list, say the first item is the pivot, the remainder is just a list of arbitrary numbers, 'xs'.