[swift-evolution] [Discussion] Binary search, lower bound, upper bound, equal range

Brent Royal-Gordon brent at architechies.com
Tue Feb 16 19:42:12 CST 2016

> You're absolutely right. I should also paint the bikeshed of naming its cases (.LT, .EQ, and .GT) less obscurely before officially proposing it to swift-evolution. Maybe either  .ascending, .equivalent, and .descending, or simply .less, .equal, and .greater.

How exciting, another bikeshed! My color:

	enum Ordering {
		case leftSmaller, bothEqual, rightSmaller

I always have trouble tying the case names back to the original expression; I *think* this might help me with that.

Brent Royal-Gordon

More information about the swift-evolution mailing list