COMPSCI 61A Lecture Notes - Lecture 27: Init
zogo39484755 and 6 others unlocked
22
COMPSCI 61A Full Course Notes
Verified Note
22 documents
Document Summary
Eval: requires an environment to handle base cases. Smybols are bound to values in the current environemnt. All other legal expressions are represented as scheme lists, called combinations. The value of an if expression is the value of a sub-expression. Evaluate that sub-expression in place of the whole expression. The quote special form evalutes to the quoted expression, which is not evaluated (quote ) (quote (+ 1 2)) => (+ 1 2) ) ) (lambda (x) (* x x) ) Self. formals = formals # scheme list of symbols. A frame represents an environment by having a parent frame. Frames are python intances with methods lookup and define. Project 4, frames do not hold return values. Define binds a symbol to a vlaue in the first frame of the current environment. Bind to its value in the current frame.