Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
tree: 73ddabc88b
Fetching contributors…

Cannot retrieve contributors at this time

11 lines (9 sloc) 0.371 kb
-module(sort).
-export([quick/1]).
quick([Pivot|Tail]) -> quick_acc(Pivot, Tail, [], []).
quick_acc(Pivot, [], Smaller, Larger) ->
Smaller ++ [Pivot] ++ Larger;
quick_acc(Pivot, [H|T], Smaller, Larger) when H =< Pivot ->
quick_acc(Pivot, T, [H|Smaller], Larger);
quick_acc(Pivot, [H|T], Smaller, Larger) when H > Pivot ->
quick_acc(Pivot, T, Smaller, [H|Larger]).
Jump to Line
Something went wrong with that request. Please try again.