Add a callback or a collection of callbacks to the list
496137
function() {
				if ( list ) {

					// If we have memory from a past run, we should fire after adding
					if ( memory && !firing ) {
						firingIndex = list.length - 1;
						queue.push( memory );
					}

					( function add( args ) {
						jQuery.each( args, function( _, arg ) {
							if ( jQuery.isFunction( arg ) ) {
								if ( !options.unique || !self.has( arg ) ) {
									list.push( arg );
								}
							} else if ( arg && arg.length && jQuery.type( arg ) !== "string" ) {

								// Inspect recursively
								add( arg );
							}
						} );
					} )( arguments );

					if ( memory && !firing ) {
						fire();
					}
				}
				return this;
			}
1154081
def trigger_all_callbacks(self, callbacks=None):
        
        return [ret
                for key in self
                for ret in self.trigger_callbacks(key, callbacks=None)]
367979
function( objs, callback ) {
            var me = this;
            var saved = [];
            for ( var i = 0, il = objs.length; i < il; i++ ) {
                me.save( objs[i], function( obj ) {
                    saved.push( obj );
                    if ( saved.length === il && callback ) {
                        me.lambda( callback ).call( me, saved );
                    }
                });
            }
            return this;
        }
65136
def add_callback(obj, callback, args=()):
    """"""
    callbacks = obj._callbacks
    node = Node(callback, args)
    # Store a single callback directly in _callbacks
    if callbacks is None:
        obj._callbacks = node
        return node
    # Otherwise use a dllist.
    if not isinstance(callbacks, dllist):
        obj._callbacks = dllist()
        obj._callbacks.insert(callbacks)
        callbacks = obj._callbacks
    callbacks.insert(node)
    return node
1305530
function add() {
            if (list) {
                // First, we save the current length
                var start = list.length;
                (function add(args) {
                    var doEach = function doEach(arg) {
                        var type = checkType(arg);
                        if (type === "function") {
                            if (!options.unique || !self.has(arg)) {
                                list.push(arg);
                            }
                        } else if (arg && arg.length && type !== "string") {
                            // Inspect recursively
                            add(arg);
                        }
                    };
                    if (Array.isArray(args)) {
                        args.forEach(doEach);
                    } else {
                        for (var k in args) {
                            doEach(args[k]);
                        }
                    }
                })(arguments);
                // Do we need to add the callbacks to the
                // current firing batch?
                if (firing) {
                    firingLength = list.length;
                    // With memory, if we're not firing then
                    // we should call right away
                } else if (memory) {
                        firingStart = start;
                        fire(memory);
                    }
            }
            return this;
        }
1183259
function(callback) {
      var found = false;
      this.each(function(key, value) {
        if (callback(key, value)) {
          found = [key, value];
          return false;
        }
      });
      return found;
    }
143074
function callbackWith() {
  this._callbackWith = [];
  var length = arguments.length;
  for (var i = 0; i < length; i++) {
    var arg = arguments[i];
    this._callbackWith.push(arg);
  }
  return this;
}
1353712
def add_callback(type, options, &block)
      callbacks[type == :around ? :before : type] << callback = Callback.new(type, options, &block)
      add_states(callback.known_states)
      callback
    end
319408
def add_all_link_done_callback(self, callback):
        """"""
        _LOGGER.debug('Added new callback %s ', callback)
        self._cb_load_all_link_db_done.append(callback)
790181
def callbacks(cls):
        ''''''
        if cls.__callbacks is not None:
            return cls.__callbacks
        cls.__callbacks = []
        for mname in dir(cls):
            # Avoid recursion by excluding all methods of this prototype class
            if mname in dir(Resource):
                continue
            callback = getattr(cls, mname)
            if not hasattr(callback, 'swagger_ops'):
                continue
            cls.__callbacks.append(callback)
        return cls.__callbacks
757639
def call_many(self, callback, args):
        """"""
        if isinstance(callback, str):
            callback = getattr(self, callback)
        f = None
        for arg in args:
            f = callback(*arg)
        return f
283629
private function _addCallback($cls, $callback, $func) 
    {
        self::_initiateCallbacks($cls);
        array_push(self::$_callbacks[$cls][$callback], $func);
    }
1113581
def add_callback(self, callback=None, errorback=None):
        
        self._callback = callback
        self._errorback = errorback
470779
def map(self, callback):
        
        return self.__class__(list(map(callback, self.items)))
674414
public static <T> CallbackList<T> create(Callback<T> callback) {
    CallbackList<T> list = new CallbackList<T>();
    list.add(callback);
    return list;
  }
887468
def call_list(self):
        """"""
        vals = []
        thing = self
        while thing is not None:
            if thing.from_kall:
                vals.append(thing)
            thing = thing.parent
        return _CallList(reversed(vals))
1249103
def register_callback(self, callback):
        
        if not callable(callback):
            raise ValueError('callback is not a callable')

        self.callbacks.append(callback)