(If this this interests you, there are some tutorial links on the LISP page.)
is a list of symbols.
in expression a = 1, b = 2, mylist = '(a b).
setq changes the value of a variable.
(setq mylist '(a b c))
Cons pairs are usually used to make lists: the first element is the first element on the list; the second element is either a cons pair for the rest of the list or a nil to mark the end of the list.
'(1 2 3)
(print (car mylist))
a
And that is basically LISP ;)
The names "car" and "cdr" came from the first machine that Lisp was written for: there were 2 registers and the commands "contents of address register" and "contents of decrement register". CommonLisp allows the more sensible names "first" and "rest".
(defun fact (x) ;a recursive function
(if (> x 0)
(* x (fact (- x 1))) 1
) )
1? this stupid function has become the HelloWorld of functional ProgrammingLanguages?, for some reason.
One page links to QuickLispTutorial:
lib/main.php:944: Notice: PageInfo: Cannot find action page
lib/main.php:839: Notice: PageInfo: Unknown action