Sorting algorithms/Quicksort: Difference between revisions

→‎JS ES6: Adjusted a boundary condition
(→‎JS ES6: Adjusted a boundary condition)
Line 2,832:
// quickSort :: (Ord a) => [a] -> [a]
const quickSort = xs =>
xs.length > 1 ? (() => {
const
h = xs[0],
Line 2,839:
[], [quickSort(less), h, quickSort(more)]
);
})() : []xs;
 
 
9,655

edits