The reducer argument to Fold is now BinaryOperator<ValueExpression> but should be BinaryOperator<SingleValueExpression> or perhaps even BinaryOperator<Value>. However, we often pass a ValueExpression such as Shorthand::add as a method reference, which would then no longer work. Experiment with a solution to this.
Possibly, we can make SingleValueExpression-versions of common operations such as the logical and binary operators. We first need to find out of we can pull this off in a clean way with the Java type system.
The
reducerargument toFoldis nowBinaryOperator<ValueExpression>but should beBinaryOperator<SingleValueExpression>or perhaps evenBinaryOperator<Value>. However, we often pass aValueExpressionsuch asShorthand::addas a method reference, which would then no longer work. Experiment with a solution to this.Possibly, we can make
SingleValueExpression-versions of common operations such as the logical and binary operators. We first need to find out of we can pull this off in a clean way with the Java type system.