// Path: src/stone/ast/BlockStmnt.java
// public class BlockStmnt extends ASTList {
//     public BlockStmnt(List<ASTree> c) { super(c); }
// }
// 
// Path: src/stone/ast/ParameterList.java
// public class ParameterList extends ASTList {
//     public ParameterList(List<ASTree> c) { super(c); }
//     public String name(int i) { return ((ASTLeaf)child(i)).token().getText(); }
//     public int size() { return numChildren(); }
// }
// 
// Path: src/chap6/Environment.java
// public interface Environment {
//     void put(String name, Object value);
//     Object get(String name);
// }


import stone.ast.BlockStmnt;
import stone.ast.ParameterList;
import chap6.Environment;
package chap7;

public class Function {
    protected ParameterList parameters;
    protected BlockStmnt body;
    protected Environment env;
    public Function(ParameterList parameters, BlockStmnt body, Environment env) {
        this.parameters = parameters;
        this.body = body;
        this.env = env;
    }
    public ParameterList parameters() { return parameters; }
    public BlockStmnt body() { return body; }
// Path: src/stone/ast/BlockStmnt.java
// public class BlockStmnt extends ASTList {
//     public BlockStmnt(List<ASTree> c) { super(c); }
// }
// 
// Path: src/stone/ast/ParameterList.java
// public class ParameterList extends ASTList {
//     public ParameterList(List<ASTree> c) { super(c); }
//     public String name(int i) { return ((ASTLeaf)child(i)).token().getText(); }
//     public int size() { return numChildren(); }
// }
// 
// Path: src/chap6/Environment.java
// public interface Environment {
//     void put(String name, Object value);
//     Object get(String name);
// }


// Path: src/chap7/Function.java
import stone.ast.BlockStmnt;
import stone.ast.ParameterList;
import chap6.Environment;

package chap7;

public class Function {
    protected ParameterList parameters;
    protected BlockStmnt body;
    protected Environment env;
    public Function(ParameterList parameters, BlockStmnt body, Environment env) {
        this.parameters = parameters;
        this.body = body;
        this.env = env;
    }
    public ParameterList parameters() { return parameters; }
    public BlockStmnt body() { return body; }
    public Environment makeEnv() { return new NestedEnv(env); }