LambdaOps
libretto.CoreDSL.LambdaOps
trait LambdaOps
Attributes
- Graph
- Supertypes
- class Objecttrait Matchableclass Any
- Known subtypes
- trait LambdaOpsWithClosures
Members list
Concise view
Value members
Abstract methods
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.
UnboundVariablesExceptionif the result expression contains free variables (from outer λs).