Executes a body of code if a form evaluates to non-
nil
, propagating the result of the form through the body of code.
A variable whose value is used in the evaluation of body .
A form, which must evaluate to non-
nil
.
A body of code to be evaluated conditionally on the result of form .
This macro executes the body of code if the form evaluates to a non-
nil
result. Within the body, the variable
var
is bound to the result of the
form
.
(when-let (position (search string1 string2))
(print position))
(let ((position (search string1 string2)))
(when position
(print position)))