package code.type;

import code.type.visitor.TypeVisitor;

/**
 * The Function Type
 *
 * @author jimeng
 * @since November 26, 2002
 */
public class FunctionType implements TypeExpression {

    public final TypeExpression domain;

    public final TypeExpression range;

    // Package scope constructor for use by TypeFactory
    FunctionType(TypeExpression domain, TypeExpression range) {
        this.domain = domain;
        this.range = range;
    }

    public <R,T> R accept(TypeVisitor<R,T> v, T o) {
        return v.visit(this, o);
    }
}

