orangeduck/BuildYourOwnLisp

Syntax for Lambda expressions

Closed this issue · 0 comments

Hi,
I was just wondering about the syntax for the lambda expressions, i.e. you have:

(\x {x y} {+ x y}) this is so that the formals and body are not evaluated immediately? i.e. treat them as quoted expressions?

My query is , could you change the parser so that if you know you are in a lambda expression, last symbol = \ or 'lambda' ;
then you set the type to 'q-expression' if that makes sense. The {} seems (quite neat but non standard) way of simplifying the parsing a bit?? Or have I missed something?