mirror of
https://github.com/janet-lang/janet
synced 2024-11-28 19:19:53 +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)))
|
,;body)))
|
||||||
|
|
||||||
(defmacro if-with
|
(defmacro if-with
|
||||||
"Similar to with, but if binding is false or nil, returns
|
"Similar to with, but if binding is false or nil, evaluates
|
||||||
nil without evaluating the body. Otherwise, the same as with."
|
the falsey path. Otherwise, evaluates the truthy path. In both cases,
|
||||||
|
ctor is bound to binding."
|
||||||
[[binding ctor dtor] truthy &opt falsey ]
|
[[binding ctor dtor] truthy &opt falsey ]
|
||||||
~(if-let [,binding ,ctor]
|
~(if-let [,binding ,ctor]
|
||||||
(defer (,(or dtor :close) ,binding) ,truthy)
|
(defer (,(or dtor :close) ,binding) ,truthy)
|
||||||
|
Loading…
Reference in New Issue
Block a user