mirror of
https://github.com/janet-lang/janet
synced 2024-12-25 16:00:27 +00:00
Improve documentation for the all
function.
This commit is contained in:
parent
373cb444fe
commit
846123ecab
@ -2065,8 +2065,9 @@
|
||||
ret)
|
||||
|
||||
(defn all
|
||||
``Returns true if all `xs` are truthy, otherwise the result of first
|
||||
falsey predicate value, `(pred x)`.``
|
||||
``Returns true if `(pred item)` returns a truthy value for every item in `xs`.
|
||||
Otherwise, returns the first falsey `(pred item)` result encountered.
|
||||
Returns true if `xs` is empty.``
|
||||
[pred xs]
|
||||
(var ret true)
|
||||
(loop [x :in xs :while ret] (set ret (pred x)))
|
||||
|
Loading…
Reference in New Issue
Block a user