LambdaOpsWithClosures

libretto.ClosedDSL.LambdaOpsWithClosures

Attributes

Graph
Supertypes
trait LambdaOps
class Object
trait Matchable
class Any

Members list

Concise view

Value members

Inherited methods

def *[A, B](using SourcePos)(f: $[A] => $[B])(using Comonoid[A]): A -⚬ B

Attributes

Inherited from:
LambdaOps
def +[A, B](using SourcePos)(f: $[A] => $[B])(using Cosemigroup[A]): A -⚬ B

Attributes

Inherited from:
LambdaOps
def ?[A, B](using SourcePos)(f: $[A] => $[B])(using Affine[A]): A -⚬ B

Attributes

Inherited from:
LambdaOps
def apply[A, B](using SourcePos)(f: $[A] => $[B]): A -⚬ B

Used to define a linear function A -⚬ B in a point-full style, i.e. as a lambda expression.

Used to define a linear function A -⚬ B in a point-full style, i.e. as a lambda expression.

Recall that when defining A -⚬ B, we never get a hold of a: A as a Scala value. However, by using this method we get a hold of a: $[A], a placeholder variable, and construct the result expression $[B]. This method then inspects how the input variable a: $[A] is used in the result $[B] and infers a (point-free) construction of A -⚬ B.

Attributes

Throws:
NotLinearException

if the given function violates linearity, i.e. if the input variable is not used exactly once.

UnboundVariablesException

if the result expression contains free variables (from outer λs).

Inherited from:
LambdaOps

Abstract fields