jan tolenaar / kiezellisp / index-of-everything

Name

if

Usage

special-form/function

Syntax

(if test then-form [else-form])

Description

If test is true, returns the result of then-form, else returns the result of else-form or null. Truth is defined by the function boolean.

make-html > (if (zero? 0)
                  1
                2)
it: 1
make-html > (if (zero? 1)
                  1
                2)
it: 2
make-html > (if (zero? 1)
                1)
it: null
make-html > (map if '(true false true) '(1 2 3) '(a b c))
it: (1 b 3)
make-html > (map if '(true false true) '(1 2 3))
it: (1 null 3)