rebellion
rebellion copied to clipboard
Record contracts
There should be contract combinators for rebellion/collection/record
. Use cases:
- Heterogeneous records where the field names are known at compile time and each field contains a different type of data. (Related: #400).
- Homogeneous records where the fields are unknown and all fields contain the same type of data.
Racket resolves this with separate combinators like list/c
and listof
, but I always found that confusing. It also doesn't work well when some fields are known but not all (see list*of
and *list/c
). Maybe an ellipses-based solution would work instead?