@function newTask

@param {object} call

@returns {function}
423776
function newTask (call) {
    // get clone of call and reset original
    call = resetCall(call)
    // require ImmutableCoreComponent
    assert.ok(GLOBAL.immutableCoreTask !== undefined, 'ImmutableAI configuration error: immutableCoreTask required')
    // get task - throws error if not found
    var task = GLOBAL.immutableCoreTask.task(call.module)
    // return function wrapper that calls new with session
    return args => {
        // make sure args is object
        if (!defined(args)) {
            args = {}
        }
        // add session to args if not defined
        if (!defined(args.session)) {
            args.session = call.session
        }
        // create new component
        return task.new(args)
    }
}
1141969
def make(from, to, url, opts = {})
      Twilio.post("/Calls", :body => {:From => from, :To => to, :Url => url}.merge(opts))
    end
1065172
function caller() {
  const returnedArgs = Array.prototype.slice.call(arguments)
  const fn = returnedArgs.shift()
  const self = this

  return wrapPromise(function (resolve, reject) {
    returnedArgs.push(function (err, args) {
      if (err) {
        reject(err)
        return
      }

      resolve(args)
    })

    fn.apply(self, returnedArgs)
  })
}
1187107
function call() {
		$args = func_get_args(); $fn = array_shift($args);
		try {
			$val = call_user_func_array($fn, $args);
			if ($val instanceof \Generator) return $this->spawn($val);
			$val = Promise::interpret( $val );
			if ($val instanceof PromiseInterface) {
				if ( $val->getState() === self::REJECTED ) $this->reject( GP\inspect($val)['reason'] );
				else $val->then( array($this,'resolve'), array($this,'reject') );
			} else {
				$this->resolve($val);
				return $val;
			}
		} catch (\Exception $e) {
			$this->reject($e);
		} catch (\Throwable $t) {
			$this->reject($t);
		}
		return $this;
	}
283589
function each(object, func, thisp) {
	return Object.keys(object).map(key => {
		return func.call(thisp, key, object[key]);
	});
}
298383
function callFunction (globalObjects, body) {
  const globalKeys = []
  const globalValues = []
  for (const key in globalObjects) {
    globalKeys.push(key)
    globalValues.push(globalObjects[key])
  }
  globalKeys.push(body)

  const result = new Function(...globalKeys)
  return result(...globalValues)
}
1146082
function(db) {
		function call_func(data, fun, params, plv8, DEBUG1, DEBUG2, DEBUG3, DEBUG4, DEBUG5, LOG, INFO, NOTICE, WARNING, ERROR) {
			try {

				// Prepare context
				var context = { 'plv8': plv8, 'DEBUG1': DEBUG1, 'DEBUG2': DEBUG2, 'DEBUG3': DEBUG3, 'DEBUG4': DEBUG4, 'DEBUG5': DEBUG5, 'LOG': LOG,
					'INFO': INFO, 'NOTICE': NOTICE, 'WARNING': WARNING, 'ERROR': ERROR };

				// Parse data
				if(!(data && (data instanceof Array))) {
					throw new TypeError("First argument is not an array");
				}

				// Parse fun
				if(fun.substr(0, 8) === 'function') {
					// FIXME: This is the same code as in nor-function -- should be reused from there.
					fun = new Function('return (' + fun + ')')();
				} else {
					throw new TypeError("Second argument is not valid serialized function");
				}

				// Parse params
				if(!(params && (params instanceof Array))) {
					throw new TypeError("Third argument is not an array");
				}

				return fun.apply(context, [].concat(data).concat(params) );

			} catch (e) {
				plv8.elog(ERROR, e);
				return;
			}
		}
		return db.query('CREATE SCHEMA IF NOT EXISTS nopg')
			.query('CREATE OR REPLACE FUNCTION nopg.call_func(data json, fun json, params json) RETURNS json LANGUAGE plv8 STABLE AS ' + NoPg._escapeFunction(call_func,
				["data", "fun", "params", "plv8", "DEBUG1", "DEBUG2", "DEBUG3", "DEBUG4", "DEBUG5", "LOG", "INFO", "NOTICE", "WARNING", "ERROR"]) );
	}
224684
function (functionName, arguments) {
                var self = this;
                var args = self._getArgs(arguments);
                var callback = self._getCallback(arguments);

                return self._generic(functionName, args)
                    .nodeify(callback);
            }
840196
def call(env)
      # remove the callback and _ parameters BEFORE calling the backend, so
      # that caching middleware does not store a copy for each value of the
      # callback parameter
      request = Rack::Request.new(env)
      callback = request.params.delete(@callback_param)
      timestamp = request.params.delete(@timestamp_param)
      env['QUERY_STRING'] = env['QUERY_STRING'].split("&").delete_if{|param|
        param =~ /^(#{@timestamp_param}|#{@callback_param})=/
      }.join("&")
      env['rack.jsonp.callback'] = callback
      env['rack.jsonp.timestamp'] = timestamp

      status, headers, response = @app.call(env)

      if callback && headers['Content-Type'] =~ /json/i
        response = pad(callback, response)
        headers['Content-Length'] = response.first.bytesize.to_s
        headers['Content-Type'] = 'application/javascript'
      elsif @carriage_return && headers['Content-Type'] =~ /json/i
        # add a \n after the response if this is a json (not JSONP) response
        response = carriage_return(response)
        headers['Content-Length'] = response.first.bytesize.to_s
      end

      [status, headers, response]
    end
271173
function recursiveCall(i, callback) {
            if(i >= _modules.length) {
                callback();
            } else {
                _modules[i].check(req, res, function () {
                    recursiveCall(++i, callback);
                })
            }
        }
407877
function call(channel, args, onError) {
        
        var result;
        var nextCalls = 0;
        var version = channel.split("@")[1] || "1.x";
        var channelName = normalizeChannelName(channel);
        var subscribers = prioritize(channelName in channels ? channels[channelName] : {}, version);
        
        var decorations = prioritize(
            merge(channelName in decorators ? decorators[channelName] : {}, decorators["*"] || {})
        );
        
        args = args || [];
        assert(Array.isArray(args), "Parameter `args` must be an array.");
        
        if (!subscribers.length) {
            throw new Error("No implementation connected for channel `" + channel + "`!");
        }
        
        subscribers.reverse().some(function (subscriber) {
            
            var newValue, lastValue, decorated;
            var decos = decorations.slice();
            
            decorated = decos.filter(versionMatches).map(function (decorator) {
                return {
                    fn: decorator.fn(next, {
                        method: "call",
                        channel: channel
                    }),
                    config: decorator.config
                };
            });
            
            decorated.push(subscriber);
            
            function versionMatches(decorator) {
                
                if (decorator.channel === "*") {
                    return true;
                }
                
                return semver.satisfies(subscriber.version, decorator.version);
            }
            
            function next() {
                
                var current, lastCallCount;
                var value = lastValue;
                
                nextCalls += 1;
                
                while (decorated.length) {
                    
                    current = decorated.shift();
                    
                    if (!decorated.length) {
                        
                        try {
                            value = current.fn.apply(null, arguments);
                        }
                        catch (error) {
                            error.mustReThrow = true;
                            throw error;
                        }
                        
                        break;
                    }
                    
                    try {
                        
                        lastCallCount = nextCalls;
                        value = current.fn.apply(null, arguments);
                        lastValue = value;
                        
                        if (nextCalls === lastCallCount) {
                            break;
                        }
                    }
                    catch (error) {
                        if (error && typeof error === "object" && error.mustReThrow) {
                            throw error;
                        }
                        else {
                            
                            if (current.config.onError) {
                                current.config.onError(error);
                            }
                            
                            bus.emit("decoratorError", current);
                        }
                    }
                    
                }
                
                return value;
            }
            
            try {
                
                newValue = next.apply(null, args);
                result = newValue;
                
                return true;
            }
            catch (error) {
                
                if (subscriber.config.onError) {
                    subscriber.config.onError(error);
                }
                
                if (onError) {
                    onError(error);
                }
                
                bus.emit("subscriberError", subscriber);
            }
            
            return false;
        });
        
        return result;
    }
262636
function call(method, varargs) {
        var argsArray = [_objectId, "_LD." + method];

        if (arguments.length > 1) {
            argsArray = argsArray.concat(Array.prototype.slice.call(arguments, 1));
        }

        return _call.apply(null, argsArray);
    }
646515
function routeChat(call) {
  call.on('data', function(note) {
    var key = pointKey(note.getLocation());
    /* For each note sent, respond with all previous notes that correspond to
     * the same point */
    if (route_notes.hasOwnProperty(key)) {
      _.each(route_notes[key], function(note) {
        call.write(note);
      });
    } else {
      route_notes[key] = [];
    }
    // Then add the new note to the list
    route_notes[key].push(note);
  });
  call.on('end', function() {
    call.end();
  });
}
955967
function sunion(/* key-1, key-N, req*/) {
  var args = slice.call(arguments, 0)
    , req = typeof args[args.length-1] === 'object' ? args.pop() : null
    , set
    , src
    , i;
  set = new Set();
  for(i = 0;i < args.length;i++) {
    src = this.getKey(args[i], req);
    if(src === undefined) continue;
    set.sadd(src.data);
  }
  return set.data;
}
1056302
function wrapSet(set){
    return function(context, value){
      set.call( context, value, context.data );
      return value;
    }
  }
569771
def _handle_func_call(self, node, scope, ctxt, stream):
        
        self._dlog("handling function call to '{}'".format(node.name.name))
        if node.args is None:
            func_args = []
        else:
            func_args = self._handle_node(node.args, scope, ctxt, stream)
        func = self._handle_node(node.name, scope, ctxt, stream)
        return func.call(func_args, ctxt, scope, stream, self, node.coord)
1074346
function callsites() {
	var _ = Error.prepareStackTrace;
	Error.prepareStackTrace = function (_, stack) {
		return stack;
	};
	var stack = new Error().stack.slice(1);
	Error.prepareStackTrace = _;
	return stack;
}