``fun_as_arg(x, fun, *more_args)`` calls ``fun(x, *more_args)``.

        Use case::

            fmin(cma.fun_as_arg, args=(fun,), gradf=grad_numerical)

        calls fun_as_args(x, args) and grad_numerical(x, fun, args=args)
507976
def fun_as_arg(self, x, *args):
        
        fun = args[0]
        more_args = args[1:] if len(args) > 1 else ()
        return fun(x, *more_args)
547697
def func_call_as_str(name, *args, **kwds):
    
    return '{0}({1})'.format(
        name,
        ', '.join(itertools.chain(
            map('{0!r}'.format, args),
            map('{0[0]!s}={0[1]!r}'.format, sorted(kwds.items())))))
1130338
def fmap(self, f: 'WrappedFunction') -> 'WrappedFunction':
        '''
            
        '''
        if not isinstance(f, WrappedFunction):
            f = WrappedFunction(f)
        return WrappedFunction(lambda *args, **kwargs: self(f(*args, **kwargs)), nargs=f.nargs, nouts=self.nouts)
1182298
def arguments(function, extra_arguments=0):
    """"""
    if not hasattr(function, '__code__'):
        return ()

    return function.__code__.co_varnames[:function.__code__.co_argcount + extra_arguments]
688921
function castArgument(arg) {
    "use strict";
    if (arg.match(/^-?\d+$/)) {
        return parseInt(arg, 10);
    } else if (arg.match(/^-?\d+\.\d+$/)) {
        return parseFloat(arg);
    } else if (arg.match(/^(true|false)$/i)) {
        return arg.trim().toLowerCase() === "true" ? true : false;
    } else {
        return arg;
    }
}
421864
def AddArg(self, argument):
    
    self.args.append(argument)
    if len(self.args) > self.number_of_args:
      raise errors.ParseError('Too many arguments for this expression.')

    elif len(self.args) == self.number_of_args:
      return True

    return False
276050
def do_args(self, arg):
        
        co = self.curframe.f_code
        dict = self.get_locals(self.curframe)
        n = co.co_argcount
        if co.co_flags & 4: n = n+1
        if co.co_flags & 8: n = n+1
        for i in range(n):
            name = co.co_varnames[i]
            if name in dict:
                self.message('%s = %s' % (name, bdb.safe_repr(dict[name])))
            else:
                self.message('%s = *** undefined ***' % (name,))
1094903
def arg_lookup(fun, aspec=None):
    '''
    
    '''
    ret = {'kwargs': {}}
    if aspec is None:
        aspec = get_function_argspec(fun)
    if aspec.defaults:
        ret['kwargs'] = dict(zip(aspec.args[::-1], aspec.defaults[::-1]))
    ret['args'] = [arg for arg in aspec.args if arg not in ret['kwargs']]
    return ret
597649
def _correct_args(func, kwargs):
    
    args = inspect.getargspec(func)[0]
    return [kwargs[arg] for arg in args] + kwargs['__args']
689206
def args(self) -> Union[Value, Sequence[ExprArg]]:
        ''''''
        if self._expr[0] in ['number', 'boolean']:
            return self._expr[1]
        elif self._expr[0] == 'pvar_expr':
            return self._expr[1]
        elif self._expr[0] == 'randomvar':
            return self._expr[1][1]
        elif self._expr[0] in ['+', '-', '*', '/']:
            return self._expr[1]
        elif self._expr[0] in ['^', '&', '|', '~', '=>', '<=>']:
            return self._expr[1]
        elif self._expr[0] in ['>=', '<=', '<', '>', '==', '~=']:
            return self._expr[1]
        elif self._expr[0] == 'func':
            return self._expr[1][1]
        elif self._expr[0] in ['sum', 'prod', 'avg', 'max', 'min', 'forall', 'exists']:
            return self._expr[1]
        elif self._expr[0] == 'if':
            return self._expr[1]
        else:
            return []
1007057
def make_function_arguments(args,
                            kwonly,
                            varargs,
                            varkwargs,
                            defaults,
                            kw_defaults,
                            annotations):
    
    return ast.arguments(
        args=[ast.arg(arg=a, annotation=annotations.get(a)) for a in args],
        kwonlyargs=[
            ast.arg(arg=a, annotation=annotations.get(a)) for a in kwonly
        ],
        defaults=defaults,
        kw_defaults=list(map(kw_defaults.get, kwonly)),
        vararg=None if varargs is None else ast.arg(
            arg=varargs, annotation=annotations.get(varargs),
        ),
        kwarg=None if varkwargs is None else ast.arg(
            arg=varkwargs, annotation=annotations.get(varkwargs)
        ),
    )
1306758
function(value, attr, fn, model, computed, indices) {
        return fn.call(this, value, attr, model, computed, indices);
      }
441362
function ap(m, x) {
  if(!((isApplicative(m) || isArray(m)) && isSameType(m, x))) {
    throw new TypeError('ap: Both arguments must be Applys of the same type')
  }

  if(isArray(x)) {
    return array.ap(m, x)
  }

  return x.ap(m)
}
757917
def convert_args_to_sets(f):
    
    @wraps(f)
    def wrapper(*args, **kwargs):
        args = (setify(x) for x in args)
        return f(*args, **kwargs)
    return wrapper
601723
def map_arg(**maps):
    
    def deco(func):
        @functools.wraps(func)
        def wrapper(*args, **kwargs):
            if six.PY2:
                argmap = inspect.getcallargs(func, *args, **kwargs)
            else:
                # getcallargs was deprecated since 3.5
                sig = inspect.signature(func)
                argmap = sig.bind_partial(*args, **kwargs).arguments
            for k, map_func in six.iteritems(maps):
                if k in argmap:
                    argmap[k] = map_func(argmap[k])
            return func(**argmap)
        return wrapper
    return deco
1071198
public static MatrixFunction asMulFunction(final double arg) {
        return new MatrixFunction() {
            @Override
            public double evaluate(int i, int j, double value) {
                return value * arg;
            }
        };
    }
419064
function get_args( args, fn_curr, fn_prev ) {
		if ( args.length && OP.toString.call( args[0] ) === '[object Arguments]' ) {
			if ( args.length < 2 && arguments.length > 1 ) {
				if ( fn_curr in internal_method_names )
					return get_args( args[0] );
				if ( fn_prev && fn_curr === fn_prev )
					return args[0];
			}
		}
		return args;
	}