# SICP Solutions

### Chapter 4, Metalinguistic Abstraction

#### Eva’s version

Well, this works as suggested in the problem.

#### Louis’s version

Now, let’s use the primitve map(by defining it in the primitive’s list).

Using it gives:

Well, its quite explanatory, our eval evaluates both of the arguments passed to map. Thus instead of applying map to lambda and '(1 2 3 4 5), the primitive map gets applied to our internal representation of the procedure(see the output containing the environment!).

So, whats the problem? The problem is we are asking mit scheme interpreter to understand our representation of procedure lambda. MIT scheme can understand lambda which are defined using mit scheme not our evaluator!

Note that even if we used primitive procedure cons instead of lambda, then it won’t work too. Because this will also get evaluated by our evaluator! And our evaluator converts it into procedure object so that it can be applied using apply.