I'm writing a metacircular evaluator in Racket and I'm having trouble with creating a syntactic abstraction for a let expression. I'm trying to create code for the body of a let, so essentially,
(expand-let '(((a 1) (b 2)) (+ a b))) should produce
'((lambda (a b) (+ a b)) 1 2)
I know I need to recurse through the bindings until the expression (+ a b) is reached, but I'm unclear on how to ask in Racket if the car of a list is a +, -, *, etc.
Any advice would be appreciated.