BASIC OPERATIONS


A LISP program consist of functions applied to its arguments. Those functions return LISP objects and are in general either predicates or commands.

WHAT IS A PREDICATE?

A predicate is a function that tests for some condition involving its arguments and returns Nil if the condition is FALSE, where Nil stands for FALSE, and anything else stands for TRUE. Also TRUE is often symbolized with the special LISP variable T.

WHAT IS A COMMAND?

A Command performs operations involving its arguments and returns a LISP S-expression.

GENERAL FORMAT

(< Command > Arg1 Arg2 .. Arg n)

Where Command is the name of a predefined function or user defined function and arg1 .. arg n are the arguments of this function.

A common mistake is to try to define a list without the quotation like:
(the white house)
the compiler will try to find a function called "the", because everything after the left parentheses has to be a function if it is not begun with quotes.

O P E R A T I O N S