ClojureDocs

Nav

Namespaces

Take the 2025 State of Clojure Survey! Help shape the future of Clojure. Take Survey →

take-while

clojure.core

Available since 1.0 (source)
  • (take-while pred)
  • (take-while pred coll)
Returns a lazy sequence of successive items from coll while
(pred item) returns logical true. pred must be free of side-effects.
Returns a transducer when no collection is provided.