guile-user
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

define-macro syntax error


From: Akop Pogosian
Subject: define-macro syntax error
Date: Tue, 12 Feb 2013 02:15:31 -0600

I am having problems getting simple define-macro to work in Guile 2.

For example, this:

(define-macro when
  (lambda (test . branch)
    `(if ,test
         (begin ,@branch))))

will give an error:

While compiling expression:
ERROR: Syntax error:
unknown file:8:0: source expression failed to match any pattern in form (define\
-macro when (lambda (test . branch) (quasiquote (if (unquote test) (begin (unqu\
ote-splicing branch))))))


What's wrong here?



reply via email to

[Prev in Thread] Current Thread [Next in Thread]