public class BindExpression extends Expression
When invoked, the returned function inserts the given value as the leading argument to the targetFunction. The other arguments are passed unchanged.
Bind is fundamentally first class, just like function applications. It requires special treatment from the type system. There is no way to write out the type of `bind`. The return type of `bind` is function. Its type looks somewhat like:
Lambda capturing is implemented through desugaring in Presto. This expression facilitates desugaring.
| Constructor and Description |
|---|
BindExpression(List<Expression> values,
Expression function) |
BindExpression(NodeLocation location,
List<Expression> values,
Expression function) |
| Modifier and Type | Method and Description |
|---|---|
<R,C> R |
accept(AstVisitor<R,C> visitor,
C context)
Accessible for
AstVisitor, use AstVisitor.process(Node, Object) instead. |
boolean |
equals(Object o) |
List<Node> |
getChildren() |
Expression |
getFunction() |
List<Expression> |
getValues() |
int |
hashCode() |
toStringgetLocationpublic BindExpression(List<Expression> values, Expression function)
public BindExpression(NodeLocation location, List<Expression> values, Expression function)
public List<Expression> getValues()
public Expression getFunction()
public <R,C> R accept(AstVisitor<R,C> visitor, C context)
ExpressionAstVisitor, use AstVisitor.process(Node, Object) instead.accept in class Expressionpublic List<Node> getChildren()
getChildren in class NodeCopyright © 2012–2023. All rights reserved.