Remove 'remove' (duplicate of 'filterfalse')

This commit is contained in:
han semaj 2014-07-21 23:07:59 +12:00
parent f94381b7e3
commit 2628653380
1 changed files with 1 additions and 7 deletions

View File

@ -111,6 +111,7 @@
(setv drop-while itertools.dropwhile)
(setv take-while itertools.takewhile)
(setv zipwith map)
(setv remove filterfalse)
(defn drop [count coll]
"Drop `count` elements from `coll` and yield back the rest"
@ -275,13 +276,6 @@
(_numeric_check n)
(> 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]
"Get all the elements of a coll, except the first."
(drop 1 coll))