morganstanley / hobbes

A language and an embedded JIT compiler
http://hobbes.readthedocs.io/
Apache License 2.0
1.16k stars 105 forks source link

add a "trunc" function to project enums out of variants #331

Closed kthielen closed 4 years ago

kthielen commented 4 years ago

This is handy for counting variants by constructor (to get a first look at how a set of variants are distributed without considering their payloads).