What I'm doing: macros generating macros generating structs, and elimination 
forms those structs. Matching against a list of arbitrary fields is easier than 
keeping track of the actual fields.

struct->list might be what I want; thanks!

-- 
Sent from my phoneamajig

> On Nov 9, 2016, at 19:23, Jack Firth <[email protected]> wrote:
> 
> I'm not 100% sure what you're attempting, but it looks like you're 
> duplicating the behavior of `struct->list`. If you wish to pattern-match on a 
> struct as if it were a list you could use the `app` match expander:
> 
>> (struct posn-3d (x y y))
>> (match (posn-3d 1 2 3)
>    [(app struct->list (list-rest x other))
>     (apply posn-3d x (reverse other)))
> (posn-3d 1 3 2)
> 
> -- 
> 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 [email protected].
> For more options, visit https://groups.google.com/d/optout.

-- 
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 [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to