Cross

public struct Cross<T, U> : Pair
extension Cross: CustomStringConvertible
extension Cross: Comparable where T: Comparable, U: Comparable
extension Cross: Equatable where T: Equatable, U: Equatable
extension Cross: Hashable where T: Hashable, U: Hashable
extension Cross: Codable where T: Codable, U: Codable

Pair of two values with potentially different types.

Instance Properties

  • a

    The first value contained herein.

    Declaration

    Swift

    public let a: T
  • b

    The second value contained herein.

    Declaration

    Swift

    public let b: U

Initializers

  • Creates a Cross with the given values.

    Declaration

    Swift

    @inlinable
    public init(_ a: T, _ b: U)

CustomStringConvertible

  • Printable description of Cross.

    Declaration

    Swift

    public var description: String { get }

Available where T: Comparable, U: Comparable

  • Declaration

    Swift

    public static func < (lhs: Cross, rhs: Cross) -> Bool

    Return Value

    true if and only if the first element of lhs is less than the first element of rhs OR if those elements are equal and the second element of lhs is less than the second element of rhs (lexicographic ordering).