Closed sdleffler closed 3 years ago
Yeah, there's no real reason to not implement Sum
. I'm not so sure about Product
, just because it'd be a bit less intuitive what it does compared to Sum
.
Sum
has been implemented long ago, and I'm not sure a Product
impl along these lines is so appropriate in Rust. Rust libraries are rarely written in "axiomic" terms like that, e.g. "it fulfills product laws, so it's a product".
Would be nice for union-ing an iterator of
EnumSet
s. :)Could also implement std::iter::Product for intersections. Thoughts?