metal icon indicating copy to clipboard operation
metal copied to clipboard

Change Fold's reducer argument to BinaryOperator<SingleValueExpression> or similar

Open jvdb opened this issue 7 years ago • 0 comments

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.

jvdb avatar Feb 13 '19 14:02 jvdb