Compose an ordered list of functions. Args of a,b,c,d evaluates as a(b(c(d(ctx))))
326337
def compose(*funcs):
    '''
    
    '''
    def _compose(ctx):
        # last func gets context, rest get result of previous func
        _result = funcs[-1](ctx)
        for f in reversed(funcs[:-1]):
            _result = f(_result)

        return _result
    return _compose
582597
def compose(*args):
    '''
    
    '''
    return reduce(lambda h,g: PotentialComposition(g,h), reversed(list(map(to_potential, args))))
1328780
function compit(ca,cb,aa,ab) {
            return (ca*aa + cb*ab * (1-aa)) / (aa+ab*(1-aa));
        }
695353
def _func_args_from_dict(self, d):
        """"""
        filtered_d = self.filter_out_none_valued_keys(d)
        return ', '.join(['%s=%s' % (k, v) for k, v in filtered_d.items()])
761954
def compose(self, *args):
        
        args = list(args)

        def composed(*ar, **kwargs):
            lastRet = self.obj(*ar, **kwargs)
            for i in args:
                lastRet = i(lastRet)

            return lastRet

        return self._wrap(composed)
883500
def _to_args(x):
    """"""
    if not isinstance(x, (list, tuple, np.ndarray)):
        x = [x]
    return x
669703
function (f, d) {

        f = makeCompareFunction(f, d);
        f.thenBy = tb;
        return f;
    }
914234
def _functionFabric(func_name, argList, oargList, password):
    """"""

    def functionHandler(self, *args, **kwargs):
        call_args = {}

        for (key, value) in oargList.items():
            call_args[key] = value

        for i, arg in enumerate(argList):
            if i < len(args):
                call_args[arg] = args[i]

        for (key, value) in kwargs.items():
            call_args[key] = value

        return _callFunc(self, func_name, password, call_args)

    functionHandler.__name__ = str(func_name)
    return functionHandler
1341613
function concatenateArguments(args1, args2) {
                if (args1.params === undefined || args2.params === undefined)
                  return tr.b.concatenateObjects(args1, args2);
                // Make an argument object to hold the combined params.
                var args3 = {};
                args3.params = tr.b.concatenateObjects(args1.params,
                                                       args2.params);
                return tr.b.concatenateObjects(args1, args2, args3);
              }
1105243
def arguments_to_lists(function):
    
    def l_function(*args, **kwargs):
        l_args = [_to_list(arg) for arg in args]
        l_kwargs = {}

        for key, value in kwargs.items():
            l_kwargs[key] = _to_list(value)
        return function(*l_args, **l_kwargs)

    return l_function
1113482
def concat(self, *others):
        
        import ibis.expr.operations as ops

        exprs = list(self.exprs())
        for o in others:
            if not isinstance(o, ExprList):
                raise TypeError(o)
            exprs.extend(o.exprs())
        return ops.ExpressionList(exprs).to_expr()
220091
function (fn, context) {
            var args = [];
            for (var i = 2; i < arguments.length; i++) {
                args.push(arguments[i]);
            }
            return function () {
                // need to make a copy each time
                var finalArgs = args.slice(0);
                // concat won't work, as arguments is a special array
                for (var i = 0; i < arguments.length; i++) {
                    finalArgs.push(arguments[i]);
                }
                return fn.apply(context, finalArgs);
            };
        }
1104493
function splitArgsIntoOptionsAndCallback (args) {
  let params;
  let options;
  let cb;
  if (args.length > 1) {
    const possibleCb = args[args.length - 1];
    if ('function' === typeof possibleCb) {
      cb = possibleCb;
      options = args.length === 3 ? args[1] : undefined;
    } else {
      options = args[1];
    }
    params = args[0];
  } else if ('object' === typeof args[0]) {
    params = args[0];
  } else if ('function' === typeof args[0]) {
    cb = args[0];
  }
  return { params, options, cb };
}
1009060
def _function(self, x, a, b, c, d):
        
        return c/((a**2-x**2)**2 + (b*x)**2)+d
1367544
def multi_substitution(*substitutions):
	
	substitutions = itertools.starmap(substitution, substitutions)
	# compose function applies last function first, so reverse the
	#  substitutions to get the expected order.
	substitutions = reversed(tuple(substitutions))
	return compose(*substitutions)
262861
function compose () {
        var fns = arguments;

        return function () {
            var result = void 0;

            for (var i = fns.length - 1; i > -1; i--) {
                if (i === fns.length - 1) {
                    result = fns[i].apply(fns[i], arguments);
                } else {
                    result = fns[i].call(this, result);
                }
            }

            return result;
        };
    }
355220
def compose(*decorators):
    
    def composed(f):
        for decor in reversed(decorators):
            f = decor(f)
        return f
    return composed