Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Lambda and the Environment Model

I need help drawing the relevant portions of the environment model diagram when evaluating this code:

Scheme>(define x 10)
Scheme> ((lambda (x y) (+ (y 3) x)) 6 (lambda (w) (* x 9)))

I need to make sure and write each lambda body next to the environment in which it is being evaluated.

Okay I know that there is only one define so most of the work will be done by “anonymous” or “nameless” functions and these will still show up in various ways in the environment model diagram

like image 754
Scheme 2020 Avatar asked Apr 30 '11 23:04

Scheme 2020


1 Answers

In addition to the answers already given, the 6.001 course at MIT has two very comprehensive lectures on the environment model, the reasons for its existence, as well as some very helpful and fine-grained step-by-step examples:

Lecture 1
Lecture 2

Hope this helps,

Jason

like image 53
Jason Avatar answered Sep 22 '22 17:09

Jason