I'm 95% sure I've done this before, but for some reason I am really stuck right now. Given
(rearrange ([(a b c) 1] [(d e) 2])) I would like any kind of shape containing [a 1] [b 1] [c 1] [d 2] [e 2]. Any kind of nesting should be fine as long as the ids are matched up 1:1 with the numbers. I've tried variants of the following but always run in to "incompatible ellipsis" problems: (define-syntax-rule (rearrange [(id ...) body] ...) '(([id body] ...) ...)) Can this be done with patterns, or do I need to use quasisyntax splicing and list manipulation? Larger context: I am making a table of proc-ids and proc-bodies. Some procs share the same bodies, so I want to be able to write [(a b c) shared-body], but eventually I need to get to [a shared-body] ... -- 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/103ad2ab-432e-4e65-b3c5-1a080c310b01%40googlegroups.com.