mirror of
https://github.com/janet-lang/janet
synced 2024-12-28 17:30:31 +00:00
Address #276
This commit is contained in:
parent
6f9c9879ca
commit
f7b7c83264
@ -1589,7 +1589,7 @@
|
|||||||
ret)
|
ret)
|
||||||
|
|
||||||
(defn some
|
(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]
|
[pred xs]
|
||||||
(var ret nil)
|
(var ret nil)
|
||||||
(loop [x :in xs :while (not ret)] (if-let [y (pred x)] (set ret y)))
|
(loop [x :in xs :while (not ret)] (if-let [y (pred x)] (set ret y)))
|
||||||
|
Loading…
Reference in New Issue
Block a user