RangeExpression
serves as an abstraction over all the range types in @tera’s example code.
instead of providing overloads for Range
, ClosedRange
, PartialRangeFrom
, PartialRangeUpTo
, and PartialRangeThrough
, you could just provide one generic RangeExpression
method.