I often write wee convenience functions to do a simple bit of math or comparison between two numeric values. For instance, given a value and a pair of thresholds, it might return an enum saying whether it's under, between, or over the thresholds.
Is there a simple way to declare a function like
func inThreshold<T: NumberThing>(value: T, lower: T, upper: T) -> ThresholdEnum...
where NumberThing is essentially Numeric + Comparable?