sort method

IList<A> sort(
  1. Order<A> oa
)

Implementation

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))));