diff options
author | Rich Hickey <richhickey@gmail.com> | 2008-06-02 19:31:51 +0000 |
---|---|---|
committer | Rich Hickey <richhickey@gmail.com> | 2008-06-02 19:31:51 +0000 |
commit | 896188b12967086f850fa5ca438a5b14c1c13790 (patch) | |
tree | 5b2492617d439ff4cc9e6734219adb7257c6e428 | |
parent | b09988ee65939daca058c5f5430692f82b16b0c9 (diff) |
fixed (range 0)
-rw-r--r-- | src/boot.clj | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/boot.clj b/src/boot.clj index 06aa9efd..55dca185 100644 --- a/src/boot.clj +++ b/src/boot.clj @@ -1190,7 +1190,7 @@ not-every? (comp not every?)) (defn range "Returns a lazy seq of nums from start (inclusive) to end (exclusive), by step, where start defaults to 0 and step to 1." - ([end] (if (< end (. Integer MAX_VALUE)) + ([end] (if (and (> end 0) (< end (. Integer MAX_VALUE))) (new clojure.lang.Range 0 end) (take end (iterate inc 0)))) ([start end] (if (and (< start end) (< end (. Integer MAX_VALUE))) |