Skip to content

Commit

Permalink
Added quicksort implementation using list comprehensions
Browse files Browse the repository at this point in the history
  • Loading branch information
johnclaus committed May 28, 2011
1 parent 2d61d11 commit e0913ea
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions erl/sorting/quicksort.erl
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
-module(quicksort).
-export([quicksort_lc/1]).

quicksort_lc([]) -> [];
quicksort_lc([Head|Tail]) ->
quicksort_lc([X||X <- Tail, X < Head]) ++ [Head] ++ quicksort_lc([X||X <- Tail, X >= Head]).

0 comments on commit e0913ea

Please sign in to comment.