I might remove the two median<T: FloatingPoint>
functions from the proposal, or at least mention the possibility in an Alternatives Considered section.
My original implementation didn't use a total ordering, so it only documented using a stable sorting algorithm. Swift 5.0+ has a stable sort (apple/swift#19717), but this isn't guaranteed yet, and would need another proposal.
TabularData.NumericSummary.median
also ignores "missing" elements, but I think that refers to Optional.none
rather than NaN.
The idea of a global median
function was suggested last year by @scanon (and endorsed by @kylemacomber). I'd like to keep the proposal short, so I'm reluctant to expand the Motivation section.
That would be the SE-0177 proposal, which was returned for revision (4 years ago), and revisited a few times since then.