throw new RuntimeException("Incorrect number of arguments: " + list);
Node second = list.children().get(1);
String name;
if (second instanceof Variable) {
Variable var = (Variable) second;
name = var.name;
} else
throw new RuntimeException("Expected function name in (define)");
Node third = list.children().get(2);
if (!(third instanceof InlineListDef))
throw new RuntimeException("Expected argument definition");
ArgDeclList args = new ArgDeclList();
List<Node> exprs = reduce(third).children();
for (Node expr : exprs) {
Variable argName = (Variable) expr;
args.add(new ArgDeclList.Argument(argName.name, null));
}
FunctionDecl functionDecl = new FunctionDecl(name, args);