Type Lambdas (original) (raw)

Scala 3 Reference

Generated with

Copyright (c) 2002-2025, LAMP/EPFL

Copyright (c) 2002-2025, LAMP/EPFL

Edit this page on GitHub

A type lambda lets one express a higher-kinded type directly, without a type definition.

For instance, the type above defines a binary type constructor, which maps arguments X and Y to Map[Y, X]. Type parameters of type lambdas can have bounds, but they cannot carry + or - variance annotations.

More details

Generated with

Copyright (c) 2002-2025, LAMP/EPFL

Copyright (c) 2002-2025, LAMP/EPFL