max
Returns the largest element.
If any of elements is NaN
, this function returns NaN
.
The operation is terminal.
Since Kotlin
1.7Throws
if the sequence is empty.
Samples
Returns the largest element.
If there are multiple equal maximal elements, this function returns the first of those elements.
The operation is terminal.
Since Kotlin
1.7Throws
if the sequence is empty.
Samples
Deprecated
Warning since 1.4
Error since 1.5
Hidden since 1.6
Use maxOrNull instead.
Replace with
this.maxOrNull()
Content copied to clipboard
Since Kotlin
1.1Deprecated
Warning since 1.4
Error since 1.5
Hidden since 1.6
Use maxOrNull instead.
Replace with
this.maxOrNull()
Content copied to clipboard