(define-syntax doit
(lambda (stx)
(syntax-case stx ()
((_ a b c)
(for-all identifier? (syntax (a b c)))
'(begin 'yes))
(_
#'(begin 'no)))))
(write (doit x y z))(newline)
(write (doit x 2 z))(newline)
it should print:
yes
no
instead it fails with:
Unhandled exception:
Condition components:
&assertion
&who: for-all
&message: "not a proper list"
&irritants: ((#<syntax x [char 224 of /home/marco/var/tmp/proof.sps]> #<syntax y [char 226 of /home/marco/var/tmp/proof.sps]> #<syntax z [char 228 of /home/marco/var/tmp/proof.sps]> . #<syntax ()>))
Launchpad Details: #LP569148 Marco Maggi - 2010-04-23 14:50:01 -0400
Run the program:
(import (rnrs))
(define-syntax doit (lambda (stx) (syntax-case stx () ((_ a b c) (for-all identifier? (syntax (a b c)))
'(begin 'yes))
(write (doit x y z))(newline) (write (doit x 2 z))(newline)
it should print:
yes no
instead it fails with:
Unhandled exception: Condition components:
Launchpad Details: #LP569148 Marco Maggi - 2010-04-23 14:50:01 -0400