Name

when-let

Usage

macro

Syntax

(when-let (sym test) &body forms)

Description

If test is true, binds the test value to the variable sym, then evaluates forms as a do-block; else null.

user > (when-let (x true) (print-line "yes") x)
yes
it: true