Please enable JavaScript.
Coggle requires JavaScript to display documents.
lisp, a symbolic expression, or s-expression, is either an atom or a list,…
-
a symbolic expression, or s-expression, is either an atom or a list, and can be evaluated
an atom is either a number, a string or a symbol
-
-
variadic functions are those take a variable number of arguments, like addition + and multiplication *
-
a list is a sequence of atoms and other lists, where the elements are separated by whitespace and are all enclosed by parentheses
numbers, strings and lists evaluate to themselves
evaluating a symbol returns the value it points to, or throws an error when it points to nothing
-
-
we can bind a value, be it a list or an atom, to a symbol, including another symbol
evaluating a list makes the interpreter look at its first element as a function name and the remaining elements as its arguments, throwing an error if the first element doesn't point to a function
evaluating a quoted symbol just returns the symbol's name, instead of its value
evaluating a quoted list makes the interpreter treat all of its symbol members as quoted symbols, and doesn't interpret the first element as function name
nil stands for the empty list, the boolean false value and a null value
a function is a set of s-expressions to be evaluated, and it is identified by its name
-
-
-