Compiler raises an error for valid macro expression

Create issue
Issue #65 resolved
Takashi Kato repo owner created an issue

A macro can be improper list but compiler raises an error.

(import (scheme base) (scheme write))

(define-syntax part-2x
  (syntax-rules ()
    ((_ a b (m n) ... x y . rest)
     (vector (list a b) (list m ...) (list n ...) (list x y)
             (cons "rest:" 'rest)))
    ((_ . rest) 'error)))

(part-2x 10 (+ 21 22) (31 32) (41 42) (51 52) (+ 61 2) 77 . "tail")

Comments (1)

  1. Log in to comment