COMPSCI 61A Lecture Notes - Lecture 27: Init

29 views4 pages
zogo39484755 and 6 others unlocked
COMPSCI 61A Full Course Notes
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.

Get access

Grade+20% off
$8 USD/m$10 USD/m
Billed $96 USD annually
Grade+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
40 Verified Answers
Class+
$8 USD/m
Billed $96 USD annually
Class+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
30 Verified Answers

Related Documents