1
0
mirror of https://github.com/DanilaFe/abacus synced 2026-01-27 09:05:19 +00:00

Fix function argument order.

This commit is contained in:
2017-07-27 16:52:16 -07:00
parent bbbb2e855e
commit 65772c8d57
2 changed files with 11 additions and 3 deletions

View File

@@ -39,13 +39,21 @@ public class FunctionNode extends TreeNode {
}
/**
* Adds a child to this node.
* Adds a child to the end of this node's child list.
* @param node the child to add.
*/
public void addChild(TreeNode node){
public void appendChild(TreeNode node){
children.add(node);
}
/**
* Adds a new child to the beginning of this node's child list.
* @param node the node to add.
*/
public void prependChild(TreeNode node) {
children.add(0, node);
}
@Override
public <T> T reduce(Reducer<T> reducer) {
Object[] reducedChildren = new Object[children.size()];