ClojureDocs

Nav

Namespaces

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

partition-by

clojure.core

Available since 1.2 (source)
  • (partition-by f)
  • (partition-by f coll)
Applies f to each value in coll, splitting it each time f returns a
 new value.  Returns a lazy seq of partitions.  Returns a stateful
 transducer when no collection is provided.