[plt-scheme] An Introduction to PLT Scheme with Pictures - macros

From: ih (irvin.hwang at gmail.com)
Date: Sun Feb 14 13:36:40 EST 2010

Hi,
I'm relatively new to scheme and had a question about macros while
going through the tutorial "An Introduction to PLT Scheme with
Pictures".

I tried to follow the macro example and create infix addition e.g. (3
in-add 4) evaluates to 7

(define-syntax in-add
  (syntax-rules ()
    [(a in-add b)
     (+ a b)]))

This did not work so my main question is how would one do this (if
possible)?  Thanks.


Posted on the users mailing list.