protected void push(Func <double, double> newCalc) { if (next == null) { next = new NestedCalculation(newCalc); } else { next.push(newCalc); } }
private NestedCalculation(Func <double, double> newCalc) { calc = new Calculation(newCalc); next = null; }
protected NestedCalculation() { calc = var => var; //as default the expression will do nothing. next = null; }