aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMark Engelberg <mark.engelberg@gmail.com>2009-03-01 01:52:01 +0000
committerMark Engelberg <mark.engelberg@gmail.com>2009-03-01 01:52:01 +0000
commit75b13a2a10df0209c75629750077a5bd3e88fbb5 (patch)
tree946ca1cad7fd419deefb348c10b5d524abe2ced2
parent942551b4d92ef0413a07955c08653fbd8300bbc1 (diff)
Eliminated double call of (vec (sort c)) in lex-permutations.
-rw-r--r--src/clojure/contrib/combinatorics.clj2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/clojure/contrib/combinatorics.clj b/src/clojure/contrib/combinatorics.clj
index d777cf2b..3f7ec141 100644
--- a/src/clojure/contrib/combinatorics.clj
+++ b/src/clojure/contrib/combinatorics.clj
@@ -150,7 +150,7 @@ On my own computer, I use versions of all these algorithms that return sequences
(let [vec-sorted (vec (sort c))]
(if (zero? (count vec-sorted))
(list [])
- (vec-lex-permutations (vec (sort c)))))))
+ (vec-lex-permutations vec-sorted))))))
(defn permutations
"All the permutations of items, lexicographic by index"