Class ChainedNaryFunction

java.lang.Object
com.singularsys.jep.functions.PostfixMathCommand
com.singularsys.extensions.chained.ChainedNaryFunction
All Implemented Interfaces:
ChainedFunctionI, DirtyFunction, JepComponent, PostfixMathCommandI, Serializable

public class ChainedNaryFunction extends PostfixMathCommand implements ChainedFunctionI, JepComponent, DirtyFunction
Converts a NaryFunction so it can be used in a chain. A nary function that takes n arguments is converted to an nary function with n-1 arguments. A unary function with two arguments f(x,y) will be converted to a unary function F(x) can be used in the middle of a chain as
[1..10] . F(5) . fold([x,y]=>x+y) 
The apply(Evaluator, Node, Object) method will first evaluate the child of the node then call the nary function f(x,y) with the first argument from the child and the second argument from the chain.
See Also:
  • Constructor Details

    • ChainedNaryFunction

      public ChainedNaryFunction(NaryFunction inner)
  • Method Details