public class FoldRight extends Fold
ValueExpression implementation of the FoldRight operation.
FoldRight differs from FoldLeft in that the reduce operation is
applied from right to left (i.e., starting at the bottom).
FoldLeft| Constructor and Description |
|---|
FoldRight(ValueExpression values,
BinaryOperator<ValueExpression> reducer,
ValueExpression initial) |
| Modifier and Type | Method and Description |
|---|---|
protected ImmutableList<Optional<Value>> |
prepareValues(ImmutableList<Optional<Value>> values) |
protected ValueExpression |
reduce(BinaryOperator<ValueExpression> reducer,
Value head,
Value tail) |
public FoldRight(ValueExpression values, BinaryOperator<ValueExpression> reducer, ValueExpression initial)
protected ImmutableList<Optional<Value>> prepareValues(ImmutableList<Optional<Value>> values)
prepareValues in class Foldprotected ValueExpression reduce(BinaryOperator<ValueExpression> reducer, Value head, Value tail)
Copyright © 2017. All rights reserved.