Class: AbstractFunction

AbstractFunction()

Abstract class representing a function.

Methods

(static) lift(o)

Converts an arbitrary object into a Function.
Parameters:
Name Type Description
o The object to convert. If o is a function, it is returned as is. Otherwise, o is converted into a ConstantFunction that returns the Value lifted from o.
Source:
Returns:
The converted function

evaluate(arguments)

Computes the return value of the function from its provided input arguments.
Parameters:
Name Type Description
arguments A variable number of input arguments
Source:
Returns:
The return value of the function

getArity()

Gets the arity of the function.
Source:
Returns:
The arity

setTo(variable, value)

Binds a variable name to a specific value.
Parameters:
Name Type Description
variable The name of the variable
value The value to bind this variable to
Source: