COMPSCI 61A Lecture Notes - Lecture 28: Eval, Universal Turing Machine, Tail Call

25 views5 pages
zogo39484755 and 6 others unlocked
COMPSCI 61A Full Course Notes
22
COMPSCI 61A Full Course Notes
Verified Note
22 documents

Document Summary

Way in which names are looked up in scheme and python is called lexical scope (or static scope) Lexical scope: parent frame is the environment in which a procedure was defined. Dynamic scope: parent of a frame is the enviornment in which a procedure was called. Define (f (lambda (x) (+ x y))) define g (lambda (x y ), (f (+ x x ))))) Lexical scope: parent for f"s frame is the global frame. Dynamic scope: parent for f"s frame is g"s frame. No re-asignment and no mutable data types name -value bindings are permanent. Val of expr is independ of order in wich sub-expressions are evaluated. Subexpressions can safely be evaluated in parallel or on demand. Referential transparency: val of expression does not change when we substitute one of its subexpressions with the value of the subexpression. Allows for memoization w/ worry of changing behavior over stuff. Functional programming lang can be just as efficient as regular.

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