// Copyright (c) 1996-2002 Brian D. Carlstrom

package bdc.scheme.expression;

import bdc.scheme.SchemeException;
import bdc.scheme.Stack;
import bdc.scheme.exception.ArgumentCountException;

abstract public class Procedure1 extends Procedure
{
    public Object apply0 (Stack stack) throws SchemeException
    {
        throw new ArgumentCountException(this, 1, 0);
    }

    abstract public Object apply1 (Stack stack) throws SchemeException;

    public Object apply2 (Stack stack) throws SchemeException
    {
        throw new ArgumentCountException(this, 1, 2);
    }

    public Object apply3 (Stack stack) throws SchemeException
    {
        throw new ArgumentCountException(this, 1, 3);
    }

    public Object apply4 (Stack stack) throws SchemeException
    {
        throw new ArgumentCountException(this, 1, 4);
    }

    public Object applyN (int n, Stack stack) throws SchemeException
    {
        throw new ArgumentCountException(this, 1, n);
    }
}
