4 ms·
I had to look up what the `:' operator does and it adds an element to the beginning of the list. So the last line should be split (left, right) x = if x<p
by l0stman 16y ago
I had to look up what the `:' operator does and it adds an element to the beginning of the list. So the last line should be
split (left, right) x = if x<p then (x:left, right), else (left, x:right)