4 ms·
Note that the argument, the list to be sorted, is pattern matched as (p:xs) which means that p is the first element of the list, and xs is the rest of the
by nemetroid 13y ago
Note that the argument, the list to be sorted, is pattern matched as
(p:xs)
which means that p is the first element of the list, and xs is the rest of the elements (i.e., xs does not contain p). In the definition of "greater":
greater = filter (>= p) xs
, the filter is applied to xs, which means that p will not be included.
- AnimalMuppet 13y agoAh, I see. Thanks!