Skip to content

Basic syntax-rules macro #6

@jcubic

Description

@jcubic

I was just testing basic syntax-rules example:

(define-syntax quux
  (syntax-rules ()
    ((_ (x ... a b) ...)
     '((x ... b a) ...))))

(quux (1 2 3 4)
      (5 6 7 8)
      (9 10 11 12))

It should be evaluated to:

((1 2 4 3) (5 6 8 7) (9 10 12 11))

but Marwood evaluates into:

((1 2 5 6 9 10 4 3) (1 2 5 6 9 10 8 7) (1 2 5 6 9 10 12 11))

It seems that this library does not have enough unit tests. It seems that there is not even a single unit test for syntax-rules.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions