Tutorial by Examples

In Common Lisp, if is the simplest conditional construct. It has the form (if test then [else]) and is evaluated to then if test is true and else otherwise. The else part can be omitted. (if (> 3 2) "Three is bigger!" "Two is bigger!") ;;=> "Three is bigger...
Most looping and conditional constructs in Common Lisp are actually macros that hide away more basic constructs. For example, dotimes and dolist are built upon the do macro. The form for do looks like this: (do (varlist) (endlist) &body) varlist is composed of the variables define...

Page 1 of 1