import { Callable } from './Callable';
import CallableFunction from './CallableFunction';
import Instance from './Instance';

export default class ArcticFunction extends CallableFunction {
    private method: Callable;

    constructor(name: string, method: Callable) {
        super(name);
        this.method = method;
    }

    bind(instance: Instance): CallableFunction {
        return this;
    }

    get arity() {
        return this.method.arity;
    }

    call(args: any[]) {
		return this.method.call(args);
    }

}