This seems like it should be simple but I've never been able to figure out how to do this. What I've been doing instead is this:
(x:integer ...+) to match two or more integers. (x:integer y:integer ...+) to match three or more. And so on. I'm at a point now where I need to build patterns dynamically to match an exact number of elements. I'd also like to avoid having to create unique names for a bunch of pattern variables. ~between seems like what I want but I haven't been able to get it to work. I've been using ~seq without issue but that isn't exactly what I need. Example of an attempt to use ~between: (syntax-parse #'(1 1 1) [((~between x 3 3)) #'(x ...)]) ; stdin::2631: syntax-parse: pattern keyword not allowed here ; at: ~between Can anyone give me a quick example of how to do this, using ~between or otherwise? I'm using syntax-parse, if that makes a difference. Thanks! -- Jonathan -- You received this message because you are subscribed to the Google Groups "Racket Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to racket-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/racket-users/c5105cd2-2c7a-4395-81e6-54e9f5ca63ff%40googlegroups.com.