Stack.prototype.push = function (fn) {
        if (typeof fn !== 'function') {
            throw new Error('Only functions may be pushed onto a Stack');
        }
        this.stack.push(fn);