1
0
mirror of https://github.com/janet-lang/janet synced 2024-12-27 00:40:26 +00:00

Fix documentation for if-with.

It was the same as when-with.
This commit is contained in:
Calvin Rose 2020-01-16 18:12:05 -06:00
parent 174ff87946
commit 6d9e51e4be

View File

@ -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)