

Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!


Wednesday, October 30
http://imgs.xkcd.com/comics/lisp_cycles.png
What are people saying about Lisp?
Scheme programs consist of expressions, which can be:
A combination that is not a call expression is a special form :
so many trees exist 9 a long noun phrase a two word modifier some trees are balanced the other trees lean The structure of a sentence can be described by a tree. Each sub-tree is a constituent. W X Y Z (Demo) The number of trees over n leaves with k leaves in the left and n-k in the right is: (The number of trees with k leaves) * (The number of trees with n-k leaves)
Lambda expressions evaluate to anonymous procedures.
(lambda () ) Two equivalent expressions: (define (plus4 x) (+ x 4)) (define plus4 (lambda (x) (+ x 4))) An operator can be a call expression too: ((lambda (x y z) (+ x y (square z))) 1 2 3) add-^ Evaluates x -&- y -&- z^^2 toprocedure^ the 11