metal
metal copied to clipboard
Change Fold's reducer argument to BinaryOperator<SingleValueExpression> or similar
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.