On Wed, Mar 30, 2011 at 11:31, John Sampson <jrs....@ntlworld.com> wrote:
> Hello - > > I am going through TYSIFD which is said to be compatible with mzScheme. > > Descriptions of macros seem to be different depending which book one reads. > TYSIFD advises the reader to 'require' the defmacro library > - '(require (lib "defmacro.rkt"))' when using Racket (I assume) - and gives > the example > > (define-macro when > (lambda (test .branch) > (list 'if test > (cons 'begin branch)))) btw, try substituting the last two lines with: (list 'if test (cons 'begin branch) #f))) the problem is that if's in racket must have both arms, while in other dialects they can be one-armed. Cheers P. _________________________________________________ For list-related administrative tasks: http://lists.racket-lang.org/listinfo/users