If I understand Amirouche correctly, the idea is that we provide
some way to take an unsigned integer encoding the combination of several
enums to an enum-set, e.g. This might be useful for translating between C-style "flag"
combinations and enum-sets.
Okay, that makes more sense now.
There is a serious bit of awkwardness,
though, in that these integers can only encode combinations of enums
with ordinals equal to 2^n for some n.
I assume the intended interpretation is that iff bit n of the integer (according to the usual SRFI 151 bit numbering) is 1, then ordinal n is in the set. In which case, getting the bitwise integer back is a fold. I still don't think it makes much sense to use an unfold to populate an enum-set, though, because the number of possible elements in an enum-set is not only finite but usually rather small.