Yeah, that works as far as it goes. But what I really want is to be able to pattern match on a vector that's part of a struct a la:
match x {
Record { headings: [], .. } => ...,
Record { footers: [], .. } => ...,
Record { body: [one_thing], .. } => ...,
...
}
match x {
Record { headings: [], .. } => ...,
Record { footers: [], .. } => ...,
Record { body: [one_thing], .. } => ...,
...
}
Comments
I'm craving Haskell-grade pattern-matching. 😊