Remove 'remove' (duplicate of 'filterfalse')
This commit is contained in:
parent
f94381b7e3
commit
2628653380
@ -111,6 +111,7 @@
|
|||||||
(setv drop-while itertools.dropwhile)
|
(setv drop-while itertools.dropwhile)
|
||||||
(setv take-while itertools.takewhile)
|
(setv take-while itertools.takewhile)
|
||||||
(setv zipwith map)
|
(setv zipwith map)
|
||||||
|
(setv remove filterfalse)
|
||||||
|
|
||||||
(defn drop [count coll]
|
(defn drop [count coll]
|
||||||
"Drop `count` elements from `coll` and yield back the rest"
|
"Drop `count` elements from `coll` and yield back the rest"
|
||||||
@ -275,13 +276,6 @@
|
|||||||
(_numeric_check n)
|
(_numeric_check n)
|
||||||
(> n 0))
|
(> n 0))
|
||||||
|
|
||||||
(defn remove [pred coll]
|
|
||||||
"Return coll with elements removed that pass `pred`"
|
|
||||||
(let [[citer (iter coll)]]
|
|
||||||
(for* [val citer]
|
|
||||||
(if (not (pred val))
|
|
||||||
(yield val)))))
|
|
||||||
|
|
||||||
(defn rest [coll]
|
(defn rest [coll]
|
||||||
"Get all the elements of a coll, except the first."
|
"Get all the elements of a coll, except the first."
|
||||||
(drop 1 coll))
|
(drop 1 coll))
|
||||||
|
Loading…
x
Reference in New Issue
Block a user