URL:
<http://savannah.gnu.org/bugs/?30072>
Summary: rest pattern after ellipsis
Project: Guile
Submitted by: szgyg
Submitted on: Mon 07 Jun 2010 06:43:36 PM GMT
Category: None
Severity: 3 - Normal
Item Group: None
Status: None
Privacy: Public
Assigned to: None
Open/Closed: Open
Discussion Lock: Any
_______________________________________________________
Details:
#|
R6RS-lib 12.4:
"P is of the form (P1 ... Pk Pe <ellipsis> Pm+1 ... Pn . Px), where
<ellipsis> is the identifier ... and F is a list or improper list of n
elements whose first k elements match P1 through Pk, whose next m - k elements
each match Pe, whose next n - m elements match Pm+1 through Pn, and whose nth
and final cdr matches Px."
So, this
|#
(let-syntax ((m (syntax-rules ()
((_ ?x ... . ?y) (list ?x ... ?y)))))
(write (m '(1 2 3 . 0))))
#|
is legal, but guile produces
ERROR: In procedure macroexpand:
ERROR: syntax-case: misplaced ellipsis in (dummy ?x ... . ?y)
|#
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/bugs/?30072>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/