Record destructuring with brev
Since brev’s defines are just me hacking in matchable support in the define headers, and I didn’t know matchable that well at first, I’m always discovering new things that this means for brev’s define.
For example, it’s a match made in heaven when working with records.
The first symbol after the dollar sign needs to be the record type, but then you can rename the slots; it goes by position, not name. You can omit unused trailing slots:
It’s still a generics define so you can define several different functions for polymorphic dispatch: