lexicographicalCompare

func lexicographicalCompare<S1 : SequenceType, S2 : SequenceType where S1.Generator.Element == S1.Generator.Element, S1.Generator.Element : Comparable>(_: S1, a2: S2)

Return true iff a1 precedes a2 in a lexicographical ("dictionary") ordering, using "<" as the comparison between elements.

Declaration

func lexicographicalCompare<S1 : SequenceType, S2 : SequenceType where S1.Generator.Element == S1.Generator.Element, S1.Generator.Element : Comparable>(a1: S1, a2: S2) -> Bool
func lexicographicalCompare<S1 : SequenceType, S2 : SequenceType where S1.Generator.Element == S1.Generator.Element>(_: S1, a2: S2, isOrderedBefore: @noescape (S1.Generator.Element, S1.Generator.Element) -> Bool)

Return true iff a1 precedes a2 in a lexicographical ("dictionary") ordering, using isOrderedBefore as the comparison between elements.

Requires: isOrderedBefore is a [strict weak ordering ](http://en.wikipedia.org/wiki/Strict_weak_order#Strict_weak_orderings) over the elements of a1 and a2`.

Declaration

func lexicographicalCompare<S1 : SequenceType, S2 : SequenceType where S1.Generator.Element == S1.Generator.Element>(a1: S1, a2: S2, isOrderedBefore less: @noescape (S1.Generator.Element, S1.Generator.Element) -> Bool) -> Bool