If

(if test statement1) -> #f or (eval (statement1))
(if test statement1 statement2) -> (eval (statement2)) or (eval (statement1))

This may be familiar to you as an "if-then" statement. However, in MOSVM, "then" is not used explicitly, but implied in the syntax.

If test evaluates to #f, then statement2 is evaluated if it is available. If it is not available, then #f is returned. MOSVM follows the Lisp rule that "anything that is not false is true", so for any other result short of error, statement1 is evaluated.

Examples:

>> (define a "Foo!")
:: #f
>> (if #t a)
:: "Foo!"
>> (if #f a)
:: #f
>> (define b "Bar!")
:: #f
>> (if #t a b)
:: "Foo!"
>> (if #f a b)
:: "Bar!"
>>