IList<A> sort(Order<A> oa) => uncons(nil, (pivot, rest) => rest .partition((e) => oa.lt(e, pivot)) .apply((smaller, larger) => smaller.sort(oa).plus(larger.sort(oa).prependElement(pivot))));