public override LazyNumber Eval(LazyNumber v1, LazyNumber v2) { if (v2 != null) { throw new ExpressionException("Did not expect a second parameter for unary operator"); } return(EvalUnary(v1)); }
public LazyIf(LazyNumber check, LazyNumber numif, LazyNumber numelse) { this.check = check; this.numif = numif; this.numelse = numelse; }
public LazyIfBreak(LazyNumber check, LazyNumber numif) { this.check = check; this.numif = numif; }
public override LazyNumber Eval(LazyNumber v1, LazyNumber v2) { return(new FunLazyNumberS(() => op.Invoke(v1.Eval(), v2.Eval()))); }
/** * Implementation for this operator. * * @param v1 * Operand 1. * @param v2 * Operand 2. * @return The result of the operation. */ public abstract LazyNumber Eval(LazyNumber v1, LazyNumber v2);
public override LazyNumber EvalUnary(LazyNumber v) { return(new FunLazyNumberS(() => this.op.Invoke(v.Eval()))); }
abstract public LazyNumber EvalUnary(LazyNumber v1);