Permalink
Find file
Fetching contributors…
Cannot retrieve contributors at this time
7 lines (4 sloc) 201 Bytes
;; http://rosettacode.org/wiki/Permutation_Sort#Clojure
(use '[clojure.contrib.combinatorics :only (permutations)])
(defn permutation-sort [s]
(first (filter (partial apply <=) (permutations s))))