com.phasmidsoftware.number.expression.expr.ExpressionFunction
See theExpressionFunction companion object
Represents a named, generic computation or transformation from an input of type P to an output value of type Valuable. The ExpressionFunction trait defines an abstract function by extending the (P => Valuable) function type. It can be used to model mathematical or computational expressions with a specific name. It is the super-type of ExpressionMonoFunction and ExpressionBiFunction.
Type parameters
P
the type of the input parameter to the function
Attributes
Companion
object
Graph
Reset zoom Hide graph Show graph
Supertypes
class Object
trait Matchable
class Any
Known subtypes
Members list
Applies the function exactly to the given input of type P, returning an Option of type Valuable if the application is successful.
Applies the function exactly to the given input of type P, returning an Option of type Valuable if the application is successful.
If defined, the output is guaranteed to be exact.
Value parameters
p
the input parameter of type P to which the function is applied
Attributes
Returns
an Option containing a Valuable result if the function executes successfully, or None if the operation cannot produce a valid result
Returns the name of the expression function.
Returns the name of the expression function.
Attributes
Returns
a string representing the name of the function
Composes two instances of Function1 in a new Function1, with this function applied first.
Composes two instances of Function1 in a new Function1, with this function applied first.
Type parameters
A
the result type of function g
Value parameters
g
a function R => A
Attributes
Returns
a new function f such that f(x) == g(apply(x))
Inherited from:
Function1
Composes two instances of Function1 in a new Function1, with this function applied last.
Composes two instances of Function1 in a new Function1, with this function applied last.
Type parameters
A
the type to which function g can be applied
Value parameters
g
a function A => T1
Attributes
Returns
a new function f such that f(x) == apply(g(x))
Inherited from:
Function1
Returns a string representation of the object.
Returns a string representation of the object.
The default representation is platform dependent.
Attributes
Returns
a string representation of the object.
Definition Classes
Function1 -> Any
Inherited from:
Function1
Applies the body of this function to the argument.
Applies the body of this function to the argument.
Value parameters
v1
the function argument
Attributes
Returns
the result of function application.
Inherited from:
Function1