FunctionK

perspective.FunctionK$package.FunctionK
object FunctionK

Attributes

Source
FunctionK.scala
Graph
Supertypes
class Object
trait Matchable
class Any
Self type
FunctionK.type

Members list

Value members

Concrete methods

def const[F[_], A](a: A): F :~>#: A

A function that always returns a constant value.

A function that always returns a constant value.

Attributes

Source
FunctionK.scala
def identity[F[_]]: FunctionK[F, F]

The identity function.

The identity function.

Attributes

Source
FunctionK.scala
def liftConst[A, B](f: A => B): A :#~>#: B

Lift a normal function to a FunctionK operating on Const types.

Lift a normal function to a FunctionK operating on Const types.

Attributes

Source
FunctionK.scala
def liftFromContravariant[F[_], A](f: (F[Any]) => A): F :~>#: A

Lift a function F[Any] => A where F is contravariant to a FunctionK operating on the kind and the Const type.

Lift a function F[Any] => A where F is contravariant to a FunctionK operating on the kind and the Const type.

Type parameters

A

The type to use as the const type.

F

The contravariant kind

Attributes

Source
FunctionK.scala
def liftFromCovariant[F[_], A](f: (F[Nothing]) => A): F :~>#: A

Lift a function F[Nothing] => A where F is covariant to a FunctionK operating on the kind and the Const type.

Lift a function F[Nothing] => A where F is covariant to a FunctionK operating on the kind and the Const type.

Type parameters

A

The type to use as the const type.

F

The covariant kind

Attributes

Source
FunctionK.scala
def liftToContravariant[F[_], A](f: A => F[Any]): A :#~>: F

Lift a function A => F[Any] where F is contravariant to a FunctionK operating on the kind and the Const type.

Lift a function A => F[Any] where F is contravariant to a FunctionK operating on the kind and the Const type.

Type parameters

A

The type to use as the const type.

F

The contravariant kind

Attributes

Source
FunctionK.scala
def liftToCovariant[F[_], A](f: A => F[Nothing]): A :#~>: F

Lift a function A => F[Nothing] where F is covariant to a FunctionK operating on the kind and the Const type.

Lift a function A => F[Nothing] where F is covariant to a FunctionK operating on the kind and the Const type.

Type parameters

A

The type to use as the const type.

F

The covariant kind

Attributes

Source
FunctionK.scala