In this problem, you must change the
concrete syntax for function abstraction as follows. First,
the "fn" and "=>" keywords are replaced with "lambda" and
a "." (period), respectively. Second, the parentheses around
the list of formal parameters are dropped. In other words,
"fn (x,y) => <exp>"
becomes "lambda x,y . <exp>".
So, for example:
"(lambda u,v . lambda f . 3 x
+(x,y))" should return:
[ "Clo", [ "f" ], [ "IntExp", 3 ], [ "Env", [ [ "u", [ "Num", 1 ] ], [ "v", [ "Num", 3 ] ] ], [ "Env", [ [ "x", [ "Num", 1 ] ], [ "y", [ "Num", 2 ] ], [ "z", [ "Num", 3 ] ] ], [ "EmptyEnv" ] ] ] ]
and
"lambda . 3" should return
[ "Clo", [ ], [ "IntExp", 3 ], [ "Env", [ [ "x", [ "Num", 1 ] ], [ "y", [ "Num", 2 ] ], [ "z", [ "Num", 3 ] ] ], [ "EmptyEnv" ] ] ]
For your answer, check each and every file below that MUST be altered to implement this modification.
Does this change impact the concrete syntax or the abstract syntax of SLang 1 (or both)?
Are we adding new types of denoted values or modifying the existing ones?
Are we adding new types of expressions?