Aleix Conchillo Flaqué <aconchi...@gmail.com> writes: > Hi, > > I'm trying to use a syntax-case guard when the pattern has ellipsis. > So I have something like, > > ((_ (struct (k v) ...)) > (string? (syntax->datum #'k)) > exp) You were probably wanting this to apply to each and every k individually? syntax-case does not work this way. Patterns with ellipsis are expected to be matched with templates with ellipsis. Sorry.
> So, how do I make the guard when I have a pattern with ellipsis? using every from (srfi srfi-1) or for-all from (rnrs lists) [same procedure different name] you get (every (compose string? syntax->datum) #'(k ...)) As an aside, this won't work in Racket, since they also make lists into syntax objects, unlike psyntax or the r6rs. -- Ian Price -- shift-reset.com "Programming is like pinball. The reward for doing it well is the opportunity to do it again" - from "The Wizardy Compiled"