Skip to content

Commit

Permalink
just re-use drop-while with a complement
Browse files Browse the repository at this point in the history
  • Loading branch information
dgtized committed Jul 14, 2024
1 parent 16ae0ed commit f196a70
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions src/shimmers/common/sequence.cljc
Original file line number Diff line number Diff line change
Expand Up @@ -214,9 +214,4 @@
"Returns a lazy sequence of the items in coll starting from the
first item for which (pred item) returns logical true."
[pred coll]
(let [step (fn [pred coll]
(let [s (seq coll)]
(if (and s (not (pred (first s))))
(recur pred (rest s))
s)))]
(lazy-seq (step pred coll))))
(drop-while (complement pred) coll))

0 comments on commit f196a70

Please sign in to comment.