1
0
mirror of https://github.com/janet-lang/janet synced 2024-11-28 11:09:54 +00:00
This commit is contained in:
Calvin Rose 2019-01-29 13:59:08 -05:00
parent 0d293cd3f5
commit 32c209ede9

View File

@ -723,7 +723,8 @@
nil if not found. Note their is no way to differentiate a nil from the indexed collection
and a not found. Consider find-index if this is an issue."
[pred ind]
(get ind (find-index pred ind)))
(def i (find-index pred ind))
(if (= i nil) nil (get ind i)))
(defn take-until
"Given a predicate, take only elements from an indexed type that satisfy