Skip to content

Commit

Permalink
CLJS-269 (rest ()) returns nil
Browse files Browse the repository at this point in the history
  • Loading branch information
netguy204 authored and David Nolen committed May 25, 2012
1 parent 44d4c78 commit 0a26ec0
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/cljs/cljs/core.cljs
Expand Up @@ -1451,7 +1451,7 @@ reduces them without incurring seq initialization"

ISeq
(-first [coll] nil)
(-rest [coll] nil)
(-rest [coll] ())

IStack
(-peek [coll] nil)
Expand Down
1 change: 1 addition & 0 deletions test/cljs/cljs/core_test.cljs
Expand Up @@ -204,6 +204,7 @@
(assert (= [3 2 1] (seq (array 3 2 1))))
(assert (= 9 (reduce + (next (seq (array 1 2 3 4))))))
(assert (= () (rest nil)))
(assert (= () (rest ())))
(assert (= () (rest [1])))
(assert (= () (rest (array 1))))
(assert (= {"x" "y"} (meta ^{"x" "y"} [])))
Expand Down

0 comments on commit 0a26ec0

Please sign in to comment.