mirror of
https://github.com/janet-lang/janet
synced 2024-11-28 11:09:54 +00:00
Fix documentation for if-with.
It was the same as when-with.
This commit is contained in:
parent
174ff87946
commit
6d9e51e4be
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user