Scala3 operators

(, en)

:

context bound

def f[T: C1 : C2, U: C3](x: T)(using y: U, z: V): R
// is expanded to
def f[T, U](x: T)(using _: C1[T], _: C2[T], _: C3[U], y: U, z: V): R

// can be combined with subtype bounds
def g[T <: B : C](x: T): R = ...

Scala 3 reference

<:

upper type bound (or subtype bound)

Scala 3 reference

?=>

context function

def fn(s: String): Int // String => Int
def asyncFn(s: String)(using ec: ExecutionContext): Future[Int]) // String => ExecutionContext ?=> Future[Int]

Scala 3 reference Reddit thread

See also