(Chez) Scheme macro for hiding lambdas
问题 I would like to write a macro to create shorthand syntax for hiding more verbose lambda expressions, but I'm struggling to understand how to write macros (which I realize is an argument against using them). Given this example: (define alist-example '((x 1 2 3) (y 4 5 6) (z 7 8 9))) (define ($ alist name) (cdr (assoc name alist))) ((lambda (a) (map (lambda (x y z) (+ x y z)) ($ a 'x) ($ a 'y) ($ a 'z))) alist-example) ((lambda (a) (map (lambda (y) (/ y (apply max ($ a 'y)))) ($ a 'y))) alist