You're viewing version 1.2.0 of split-with. The latest stable version of Clojure Core is 1.3.0.
1.2.0 Arrow_down_16x16

split-with

clojure.core

  • (split-with pred coll)
Returns a vector of [(take-while pred coll) (drop-while pred coll)]

1 Example top

  • user=> (split-with (partial >= 3) [1 2 3 4 5])
    [(1 2 3) (4 5)]
    
Log in to add / edit an example.

See Also top

Log in to add a see also.

Plus_12x12 Minus_12x12 Source clojure/core.clj:2224 top

(defn split-with
  "Returns a vector of [(take-while pred coll) (drop-while pred coll)]"
  {:added "1.0"}
  [pred coll]
    [(take-while pred coll) (drop-while pred coll)])
Vars in clojure.core/split-with: defn
Used in 0 other vars

Comments top

No comments for split-with. Log in to add a comment.