Comment Comment by tsss What about func make_numbers() -> Sequence<Any> This should work as long as Sequence is covariant on Element. You could return any possible Sequence here, like Sequence<Int> or Sequence<Double>. The user of the function wouldn't know.You could also do something like func make_numbers() -> Sequence<Comparable&PartialOrder> parent tsss 7 years ago
You could also do something like