Returns a function that is the composition of a list of functions, each
        consuming the return value of the function that follows.
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)
642136
function enumerateFunctions(relations) {
    const blacklist = [
        'use',
        'tearDown',
        'define'
    ];
    return _.reduce(relations, function(functions, prop, key) {
        if (blacklist.indexOf(key) === -1 && _.isFunction(prop)) {
            functions.push(key);
        }

        return functions;
    }, []);
}
269776
def _construct_functions(self, coefs, **kwargs):
        """"""
        return [self.basis_functions.functions_factory(coef, **kwargs) for coef in coefs]
275866
function promisify(func) {
        return function(str, options) {
            var result,
                deferred = q.defer(),
                promise = deferred.promise;

            if (!_.isFunction(func)) {
                deferred.reject();
            }
            else {
                result = func(str, options);

                if (_.isBoolean(result)) {
                    promise = handleBoolean(result, deferred);
                }
                else if (_.isFunction(result.then)) {
                    promise = result;
                }

            }
            return promise;
        };
    }
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)
188165
function composition(f) {
    var A = f();

    return forAll(_.Int).satisfy(function(a) {
      var g = function(x) { return x * 2; };
      var h = function(x) { return x - 1; };

      function compose(f) {
        return function(g) {
          return function(x) {
            return f(g(x));
          };
        };
      }

      var x = A.of(compose).ap(A.of(g)).ap(A.of(h)).ap(A.of(a));
      var y = A.of(g).ap(A.of(h).ap(A.of(a)));

      return x.isEqual(y);
    });
  }
190615
function(/* funs */) {
      var funs = arguments;

      return function(/* args */) {
        var args = arguments;
        return _.map(funs, function(f) {
          return f.apply(this, args);
        }, this);
      };
    }
440285
public static <T, V> LazyIterable<V> collectIf(
            Iterable<T> iterable,
            Predicate<? super T> predicate,
            Function<? super T, ? extends V> function)
    {
        return LazyIterate.select(iterable, predicate).collect(function);
    }
744752
function(fn1, fn2) {
        return function composed() {
          return fn1.call(null, fn2.apply(null, arguments));
        }
      }
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;
        };
    }
715143
public static <A, B> Predicate<A> compose(Predicate<B> predicate, Function<A, ? extends B> function) {
		return t -> predicate.test(function.apply(t));
	}
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
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));
	}
948222
function flow (functions) {
  if (!functions.length) {
    return function (arg) { return arg }
  }

  return function () {
    var result = functions[0].apply(this, arguments)
    for (var i = 1; i < functions.length; i++) {
      result = functions[i](result)
    }
    return result
  }
}
574217
public function compose() {
    $functions = self::_wrapArgs(func_get_args(), 1);
    
    return self::_wrap(function() use ($functions) {
      $args = func_get_args();
      foreach($functions as $function) {
        $args[0] = call_user_func_array($function, $args);
      }
      return $args[0];
    });
  }
1093003
function compose(...fns) {
  return function(x) {
    return fns.reduceRight((result, val) => val(result), x);
  };
}
121424
public static <T1,T2,T3> Function<T1,T3> comp(final Function<T2,T3> func1, final Function<T1,T2> func2) {
	return new Function<T1,T3>() {
	    public T3 f(T1 x) {
		return func1.f(func2.f(x));
	    }
	};
    }