1
0
mirror of https://github.com/janet-lang/janet synced 2024-06-24 22:23:15 +00:00
This commit is contained in:
Calvin Rose 2020-01-25 12:08:43 -06:00
parent 6f9c9879ca
commit f7b7c83264

View File

@ -1589,7 +1589,7 @@
ret)
(defn some
"Returns false if all xs are false or nil, otherwise returns the first true value."
"Returns nil if all xs are false or nil, otherwise returns the first true value."
[pred xs]
(var ret nil)
(loop [x :in xs :while (not ret)] (if-let [y (pred x)] (set ret y)))