Calls `ComposedFunction`s and returns its return value. By default, this
    function will recursively iterate dicts, lists, tuples, and sets and
    replace all `ComposedFunction`s with their return value.
424539
def resolve_composed_functions(data, recursive=True):
    

    if isinstance(data, ComposedFunction):
        data = data()

    if recursive:
        if isinstance(data, dict):
            for key, value in data.items():
                data[key] = resolve_composed_functions(
                    value,
                    recursive=recursive,
                )
        elif isinstance(data, (list, tuple, set)):
            for index, value in enumerate(data):
                data[index] = resolve_composed_functions(
                    value,
                    recursive=recursive,
                )

    return data
704231
public static <T, R> Consumer<T> compose(Function<? super T, ? extends R> function, Consumer<? super R> consumer) {
		return value -> consumer.accept(function.apply(value));
	}
190285
function composeS(...args) {
  if(!arguments.length) {
    throw new TypeError(err)
  }

  const ms =
    args.slice().reverse()

  const head =
    ms[0]

  if(!isSemigroupoid(head)) {
    throw new TypeError(err)
  }

  if(ms.length === 1) {
    return head
  }

  return ms.slice().reduce((comp, m) => {
    if(!isSameType(comp, m)) {
      throw new TypeError(err)
    }

    return comp.compose(m)
  })
}
1093056
function compose(middleware){
	return function *(next){
		var i = middleware.length;
		next = next || function *(){};
		var mw;

		while (i--) {
			mw = middleware[i];
			next = mw.call(this, next);
		}

		yield *next;
	}
}
106575
def lambda_tuple_converter(func):
    
    if func is not None and func.__code__.co_argcount == 1:
        return lambda *args: func(args[0] if len(args) == 1 else args)
    else:
        return func
915860
def math_func(f):
    
    @wraps(f)
    def wrapper(*args, **kwargs):
        if len(args) > 0:
            return_type = type(args[0])
        if kwargs.has_key('return_type'):
            return_type = kwargs['return_type']
            kwargs.pop('return_type')
            return return_type(f(*args, **kwargs))
        args = list((setify(x) for x in args))
        return return_type(f(*args, **kwargs))
    return wrapper
1306919
function compose(auto_template, dictionary, key, params) {
    var composer = dictionary[key];

    // If auto_template is set to true, make dictionary value
    if (auto_template) {
        if (typeof composer === "string") {
            composer = _.template(composer);
        } else if (typeof composer !== "function" ) {
            var msg = 'Expected value to auto-template - "' + composer + '" - to be type "string"';
            msg += ' but got "' + typeof composer + '".';
            throw new Error(msg);
        }
    }

    switch (typeof composer) {
        case "string": return composer;
        case "function": return composer(params);
        default:
            {
                var msg = 'Unprocessable message "' + composer + '" of type "' + typeof composer;
                msg += '" for key "' + key + '".'
                throw new Error(msg);
            }
    }
}
1118255
function composeClass(base, mixin) {
  if (typeof mixin === 'function') {
    // Mixin function
    return mixin(base);
  } else {
    // Mixin object
    class Subclass extends base {}
    copyOwnProperties(mixin, Subclass.prototype, NON_MIXABLE_OBJECT_PROPERTIES);
    return Subclass;
  }
}
57553
def compose(func_list):
    

    def f(G, bim):
        for func in func_list:
            G, bim = func(G, bim)
        return G, bim

    return f
503161
def uniq_by(self, func: Callable[[T], Any]) -> 'TList[T]':
        
        rs = TList()
        for e in self:
            if func(e) not in rs.map(func):
                rs.append(e)
        return rs
919543
function map(fn, m) {
  if(!isFunction(fn)) {
    throw new TypeError('map: Function required for first argument')
  }

  if(isFunction(m)) {
    return compose(fn, m)
  }

  if(isArray(m)) {
    return array.map(fn, m)
  }

  if(m && isFunctor(m)) {
    return (m[fl.map] || m.map).call(m, fn)
  }

  if(isObject(m)) {
    return object.map(fn, m)
  }

  throw new TypeError('map: Object, Function or Functor of the same type required for second argument')
}
215207
def compose(*funcs):
    """"""
    return lambda x: reduce(lambda v, f: f(v), reversed(funcs), x)
207753
def recursive_map(func, data):
    
    def recurse(item):
        return recursive_map(func, item)
    items_mapped = map_collection(recurse, data)
    return func(items_mapped)
964512
def _apply_to_data(data, func, unpack_dict=False):
    
    apply_ = partial(_apply_to_data, func=func, unpack_dict=unpack_dict)

    if isinstance(data, dict):
        if unpack_dict:
            return [apply_(v) for v in data.values()]
        return {k: apply_(v) for k, v in data.items()}

    if isinstance(data, (list, tuple)):
        try:
            # e.g.list/tuple of arrays
            return [apply_(x) for x in data]
        except TypeError:
            return func(data)

    return func(data)
876195
function compose(fn1, fn2 /*, fn3, etc */) {
  if (!arguments.length) {
    throw new Error(
      'expected at least one (and probably more) function arguments'
    );
  }
  var fns = arguments;

  return function() {
    var result = fns[0].apply(this, arguments);
    var len = fns.length;
    for (var i = 1; i < len; i++) {
      result = fns[i].call(this, result);
    }
    return result;
  };
}
1088119
def get_functions_overridden_by(self, function):
        '''
            

        '''
        candidates = [c.functions_not_inherited for c in self.inheritance]
        candidates = [candidate for sublist in candidates for candidate in sublist]
        return [f for f in candidates if f.full_name == function.full_name]
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)