Currently, ClosedRangeProtocol inherits only from Semigroup ( giving us +), but if the Bound value of a ClosedRangeProtocol is also a Monoid (numerical types, Rational types), then we can benefit from the Monoidal qualities.
That being said, I'm not sure if this is quite possible yet:
Currently,
ClosedRangeProtocol
inherits only fromSemigroup
( giving us+
), but if theBound
value of aClosedRangeProtocol
is also aMonoid
(numerical types,Rational
types), then we can benefit from theMonoidal
qualities.That being said, I'm not sure if this is quite possible yet:
We currently get the error:
Extension of protocol cannot have an inheritance clause.
It would be nice to be able to sweep over a sequence of
ClosedRange<MetricalDuration>
with: