This document discusses the history and features of the Lisp programming language. It provides a timeline of the evolution of Lisp from 1958 to present day, highlighting important Lisp dialects like Scheme and Common Lisp. The rest of the document explores key aspects of Lisp like symbolic expressions, lazy evaluation, homoiconicity, and the read-eval-print loop interface. It also provides examples of basic Lisp code like arithmetic expressions and recursive functions.
31. quote
gosh> c
*** ERROR: unbound variable: c
Stack Trace:
_______________________________
gosh> (quote c)
c
gosh> 'c
c
gosh>
31
32. quote
gosh> (x y z)
*** ERROR: unbound variable: y
Stack Trace:
_________________________________
gosh> '(x y z)
(x y z)
gosh> (append '(a b) '(c d))
(a b c d)
gosh>
32
33. S
gosh> (car '(a b c))
a
gosh> (cdr '(a b c))
(b c)
gosh> (cons 'a '(b c))
(a b c)
gosh>
33
34. gosh>
(define (fact n)
(if (= n 0)
1
(* n (fact (- n 1)))))
fact
gosh> (fact 3)
6
gosh> (fact 10)
3628800
gosh>
34