JanetDocsI'm feeling luckyGithub sign in

if-let



    macro
    boot.janet on line 616, column 1

    (if-let bindings tru &opt fal)
    
    Make multiple bindings, and if all are truthy, evaluate the tru form.
    If any are false or nil, evaluate the fal form. Bindings have the same
    syntax as the let macro.


2 examplesSign in to add an example
Loading...
(if-let [x true 
         y (not (not x))]
  :a
  :b)
# => :a
sogaiu
(if-let [x true 
         y (not x)]
  :a
  :b)
# => :b
sogaiu