code: function(func,args) {
      var type = lib.type.typeOf(func);
      if (type === "string") {
        var fargs = [];
        if (args instanceof Array) {
          fargs.push.apply(fargs,args);
        }
        fargs.push(func);
        func = Function.constructor.apply(Function,fargs);
      } else if (type === "error") {
        func = function() { throw func };
      } else if (type === "object") {
        func = new Method(null,func).toFunction();
      } else if (type === "undefined") {
        func = function() {};
      }
      var index = this.functions.length;
      this.functions.push(func);
      return index;
    }
docs: .addFunction(function, arguments)