[swift-evolution] [Draft] Expanded min/max algorithms
plxswift at icloud.com
Sun Apr 17 10:09:47 CDT 2016
I *quite* like `extrema`/`indicesOfExtrema` over minmax.
> On Apr 17, 2016, at 10:03 AM, Patrick Pijnappel <patrickpijnappel at gmail.com> wrote:
> I like the idea. A few notes on naming:
> – minIndex is somewhat confusing to me (it sounds like it's getting the minimum index, i.e. indices.minElement()). How about indexOfMin() or indexOfMinElement()?
> – minmax() also doesn't read very well to me, plus it should technically be minMax() which is kinda ugly. Perhaps limits() or extrema()? The latter would be the most correct mathematically. For the index form that would give e.g. indicesOfExtrema().
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the swift-evolution