ComparisonResult

Used to indicate how items in a request are ordered, from the first one given in a method invocation or function call to the last (that is, left to right in code). Given the function:

iOS
2.0+
macOS
10.0+
tvOS
9.0+
watchOS
2.0+
@frozen enum ComparisonResult
func f(a: Int, b: Int) -> ComparisonResult

If: a < b then return .orderedAscending. The left operand is smaller than the right operand. a > b then return .orderedDescending. The left operand is greater than the right operand. a == b then return .orderedSame. The operands are equal.