Consider the following grammar:
<M> ::= id | ( lambda id <M> ) | ( <M> <M> ) | (let (id <M>) <M>)
where id is a Scheme symbol.
- Write a Scheme program that accepts an expression in the above language and produces a list of its free variables.
- Write a Scheme program that accepts a variable and an expression in the above language, and returns #t iff the variable occurs free in the expression.
Free variables are defined as the corresponding Scheme expressions.