JanetDocsPlaygroundI'm feeling luckyGitHub sign in

if-let



    macro
    boot.janet on line 617, 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
sogaiuPlayground
(if-let [x true 
         y (not x)]
  :a
  :b)
# => :b
sogaiuPlayground