Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
[lazy] fixed take-while
  • Loading branch information
richhickey committed Feb 13, 2009
1 parent 795925c commit db27101
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/clj/clojure/core.clj
Expand Up @@ -1512,8 +1512,8 @@
[pred coll]
(lazy-seq
(when-let [s (seq coll)]
(when (pred (first s)))
(cons (first s) (take-while pred (more s))))))
(when (pred (first s))
(cons (first s) (take-while pred (more s)))))))

(defn drop
"Returns a lazy sequence of all but the first n items in coll."
Expand Down

0 comments on commit db27101

Please sign in to comment.