From 6d9e51e4be05a92b97c4b1c2663695b1c393ac23 Mon Sep 17 00:00:00 2001 From: Calvin Rose Date: Thu, 16 Jan 2020 18:12:05 -0600 Subject: [PATCH] Fix documentation for if-with. It was the same as when-with. --- 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 7613e5a9..18f6b5ff 100644 --- a/src/boot/boot.janet +++ b/src/boot/boot.janet @@ -313,8 +313,9 @@ ,;body))) (defmacro if-with - "Similar to with, but if binding is false or nil, returns - nil without evaluating the body. Otherwise, the same as with." + "Similar to with, but if binding is false or nil, evaluates + the falsey path. Otherwise, evaluates the truthy path. In both cases, + ctor is bound to binding." [[binding ctor dtor] truthy &opt falsey ] ~(if-let [,binding ,ctor] (defer (,(or dtor :close) ,binding) ,truthy)