From 846123ecab395d3febb2049a6b6cd40193edfa3e Mon Sep 17 00:00:00 2001 From: harryvederci <26745575+harryvederci@users.noreply.github.com> Date: Fri, 9 Dec 2022 11:16:42 +0000 Subject: [PATCH] Improve documentation for the `all` function. --- src/boot/boot.janet | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/boot/boot.janet b/src/boot/boot.janet index 4b0af9cd..9eebc67b 100644 --- a/src/boot/boot.janet +++ b/src/boot/boot.janet @@ -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)))