operator
<
= {
associativity
precedence
}
Declarations
Returns a Boolean value indicating whether the first tuple is ordered before or the same as the second in a lexicographical ordering.
Given two tuples (a1, a2, ..., aN)
and (b1, b2, ..., bN)
, the first
tuple is before or the same as the second tuple if and only if
a1 < b1
or (a1 == b1
and
(a2, ..., aN) <= (b2, ..., bN)
).
Parameters:
lhs: A tuple of Comparable
elements.
rhs: Another tuple of elements of the same type as lhs
.
Declaration
func
<
=
<
A
:
Comparable
,
B
:
Comparable
,
C
:
Comparable
,
D
:
Comparable
,
E
:
Comparable
,
F
:
Comparable
>
(
lhs
: (
A
,
B
,
C
,
D
,
E
,
F
),
rhs
: (
A
,
B
,
C
,
D
,
E
,
F
)) -
>
Bool
Returns a Boolean value indicating whether the first tuple is ordered before or the same as the second in a lexicographical ordering.
Given two tuples (a1, a2, ..., aN)
and (b1, b2, ..., bN)
, the first
tuple is before or the same as the second tuple if and only if
a1 < b1
or (a1 == b1
and
(a2, ..., aN) <= (b2, ..., bN)
).
Parameters:
lhs: A tuple of Comparable
elements.
rhs: Another tuple of elements of the same type as lhs
.
Declaration
func
<
=
<
A
:
Comparable
,
B
:
Comparable
,
C
:
Comparable
,
D
:
Comparable
,
E
:
Comparable
>
(
lhs
: (
A
,
B
,
C
,
D
,
E
),
rhs
: (
A
,
B
,
C
,
D
,
E
)) -
>
Bool
Returns a Boolean value indicating whether the first tuple is ordered before or the same as the second in a lexicographical ordering.
Given two tuples (a1, a2, ..., aN)
and (b1, b2, ..., bN)
, the first
tuple is before or the same as the second tuple if and only if
a1 < b1
or (a1 == b1
and
(a2, ..., aN) <= (b2, ..., bN)
).
Parameters:
lhs: A tuple of Comparable
elements.
rhs: Another tuple of elements of the same type as lhs
.
Declaration
func
<
=
<
A
:
Comparable
,
B
:
Comparable
,
C
:
Comparable
,
D
:
Comparable
>
(
lhs
: (
A
,
B
,
C
,
D
),
rhs
: (
A
,
B
,
C
,
D
)) -
>
Bool
Returns a Boolean value indicating whether the first tuple is ordered before or the same as the second in a lexicographical ordering.
Given two tuples (a1, a2, ..., aN)
and (b1, b2, ..., bN)
, the first
tuple is before or the same as the second tuple if and only if
a1 < b1
or (a1 == b1
and
(a2, ..., aN) <= (b2, ..., bN)
).
Parameters:
lhs: A tuple of Comparable
elements.
rhs: Another tuple of elements of the same type as lhs
.
Declaration
func
<
=
<
A
:
Comparable
,
B
:
Comparable
,
C
:
Comparable
>
(
lhs
: (
A
,
B
,
C
),
rhs
: (
A
,
B
,
C
)) -
>
Bool
Returns a Boolean value indicating whether the first tuple is ordered before or the same as the second in a lexicographical ordering.
Given two tuples (a1, a2, ..., aN)
and (b1, b2, ..., bN)
, the first
tuple is before or the same as the second tuple if and only if
a1 < b1
or (a1 == b1
and
(a2, ..., aN) <= (b2, ..., bN)
).
Parameters:
lhs: A tuple of Comparable
elements.
rhs: Another tuple of elements of the same type as lhs
.
Declaration
func
<
=
<
A
:
Comparable
,
B
:
Comparable
>
(
lhs
: (
A
,
B
),
rhs
: (
A
,
B
)) -
>
Bool
Returns a Boolean value indicating whether the value of the first argument is less than or equal to that of the second argument.
This is the default implementation of the less-than-or-equal-to
operator (<=
) for any type that conforms to Comparable
.
Parameters: lhs: A value to compare. rhs: Another value to compare.
Declaration
func
<
=
<
T
:
Comparable
>
(
lhs
:
T
,
rhs
:
T
) -
>
Bool
Declaration
func
<
=
<
T
:
FloatingPoint
>
(
lhs
:
T
,
rhs
:
T
) -
>
Bool
Declaration
func
<
=
<
T
where
T
.
RawValue
:
Comparable
>
(
lhs
:
T
,
rhs
:
T
) -
>
Bool
Returns a Boolean value that indicates whether the first argument is less than or equal to the second argument.
See Also:
Equatable
,Comparable
Declaration
func
<
=(
lhs
:
Int
,
rhs
:
Int
) -
>
Bool