- evaluating expressions expressions of the form '(QUOTE) : prevent evaluating whatever follows the quote Try the following in the Lisp command window: 'alpha (+ 1 2 3) (* (- 5 2) (+ 1 5)) '(+ 3 5) () nil - asigning de values: SETQ, SET, PSETQ Try the following in the Lisp command window: (setq a 'alpha) (+ (setq x 1) (setq y 2)) - the eval function: forces another level of evaluation of the expression. Try the following in the Lisp command window: (setq x 'a a 'alpha) (eval x) - Lists - standard functions: CONS, CAR, CDR, NTH, LAST, LIST, LISP, NULL, APPEND Lisp represents lists internally as singly linked lists. Each node in a Lisp list is called a cons cell. A cons cell consists of two parts: a car and a cdr (pronounced "could-er"). The car points to the element the node is holding. The cdr points to the next cons cell in the list, or else it points to nil, which represents the end of the list. Dotted pairs: both car and cdr point to atoms: (a.b) cons: builds a cons cell from two s-expressions, resulted from evaluating the two given arguments. the first result is placed in car and the second in cdr. Try the following in the Lisp command window: (cons 'a nil) (cons 'a 'b) (cons 'a '(b c)) car: (car '(a b c)) car '((alpha beta) c d)) cdr: (cdr '(a b c)) (cdr '(a)) (cdr '(a . b)) (car (cdr (cdr '(a b c d)))) (setq x '(a b c) y (cdr x)) (set (car '(x y)) '(a b c)) nth: (nth 1 '(a b c)) last: (last '(a b c)) (last (cons 'a 'b)) (last (cons 'a nil)) list: creates a list from its evaluated arguments: (list 'a 'b 'c) (list 'a '(b c)) listp: (listp '(a b c)) null: (null nil) append: (append '(a b c) '(alpha beta) '(1 gamma 2)) - Defining your own functions: defun (defun sum2 (x y) (+ x y 2)) (sum2 4 6) (defun get-second (x) (car (cdr x))) (get-second '(a b c)) See also: http://www.apl.jhu.edu/~hall/lisp.html http://www.cs.cmu.edu/Groups/AI/html/cltl/clm/ http://www.cs.gmu.edu/~sean/lisp/cons/