ExtraImplicits
Attributes
- Source
- Ordering.scala
- Graph
-
- Supertypes
- Known subtypes
-
object Implicits
Members list
Implicits
Implicits
This implicit creates a conversion from any value for which an implicit Ordering exists to the class which creates infix operations. With it imported, you can write methods as follows:
This implicit creates a conversion from any value for which an implicit Ordering exists to the class which creates infix operations. With it imported, you can write methods as follows:
import scala.math.Ordering.Implicits.*
def lessThan[T: Ordering](x: T, y: T) = x < y
Type parameters
- T
-
the type of the value being compared
Value parameters
- ord
-
the implicit
Orderinginstance for typeT - x
-
the value to enrich with infix ordering operators
Attributes
- Returns
-
an
OrderingOpsinstance providing infix comparison operators - Source
- Ordering.scala
Not in the standard scope due to the potential for divergence: For instance implicitly[Ordering[Any]] diverges in its presence.
Not in the standard scope due to the potential for divergence: For instance implicitly[Ordering[Any]] diverges in its presence.
Type parameters
- CC
-
the higher-kinded type constructor for the sequence type, bounded by
scala.collection.Seq
Attributes
- Source
- Ordering.scala
Attributes
- Source
- Ordering.scala