Compose and evaluate the function.
162650
def compute(self, *args, **kwargs)->[Any, None]:
        
        return super().compute(
            self.compose, *args, **kwargs
        )
1012885
function composeK(...args) {
  if(!arguments.length) {
    throw new TypeError(err)
  }

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

  const head =
    fns[0]

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

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

  const tail = fns.slice(1).reduce((comp, fn) => {
    if(!isFunction(fn)) {
      throw new TypeError(err)
    }

    return function(m) {
      if(!isChain(m)) {
        throw new TypeError(err)
      }
      return comp(m).chain(fn)
    }
  }, x => x)

  return function() {
    return tail(head.apply(null, arguments))
  }
}
985757
def compose(other, *args)
      outcome = other.run(*args)

      raise Interrupt, outcome.errors if outcome.invalid?

      outcome.result
    end
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];
    });
  }
543393
def _compile(self, **kwargs):
        '''
        '''
        util.log('compiling evaluation function')
        self.f_eval = theano.function(self._inputs,
                                      self._monitor_exprs,
                                      updates=self._updates,
                                      name='evaluation')
        label = self.__class__.__name__
        util.log('compiling {} optimizer'.format(click.style(label, fg='red')))
        updates = list(self._updates) + list(self.get_updates(**kwargs))
        self.f_step = theano.function(self._inputs,
                                      self._monitor_exprs,
                                      updates=updates,
                                      name=label)
1290059
def _evaluate(x, y, weights):
    '''
    
    '''
    i = _validI(x, y, weights)
    xx = x[i]
    y = y[i]

    try:
        fitParams = _fit(xx, y)
        # bound noise fn to min defined y value:
        minY = function(xx[0], *fitParams)
        fitParams = np.insert(fitParams, 0, minY)
        fn = lambda x, minY=minY: boundedFunction(x, *fitParams)
    except RuntimeError:
        print(
            "couldn't fit noise function with filtered indices, use polynomial fit instead")
        fitParams = None
        fn = smooth(xx, y, weights[i])
    return fitParams, fn, i
396856
def _compose_func(func, args_func=lambda req_info: [req_info.index]):
    
    return FuncInfo(func=func, args_func=args_func)
476169
def eval_mean(self, func, args=()):
        """"""
        self.fmean = func(self.mean, *args)
        return self.fmean
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;
        };
    }
1306758
function(value, attr, fn, model, computed, indices) {
        return fn.call(this, value, attr, model, computed, indices);
      }
1037542
private <T>  void composeIfPossible(Validator<T> v, T t) {
        final FluentValidator self = this;
        if (v instanceof ValidatorHandler) {
            ((ValidatorHandler) v).compose(self, context, t);
        }
    }
386929
function (f, cont) {
    var result = f();
    if (result && typeof result.always === 'function') {
      result.always(cont);
    } else {
      cont();
    }
  }
761741
def _compile_int_f(self):
        """"""
        string = '"""\n'
        string += 'system.dae.init_f()\n'

        # evaluate differential equations f
        for fcall, call in zip(self.fcall, self.fcalls):
            if fcall:
                string += call
        string += 'system.dae.reset_small_f()\n'
        string += '"""'
        self.int_f = compile(eval(string), '', 'exec')
571907
function compose(key, compositor, traits) {
		return Fn.compose(this.prototype, key, compositor, traits);
	}
871514
def do(self, func, *args, **kwargs):
        
        if not callable(func):
            func = getattr(self.engine.function, func)
        func(self, *args, **kwargs)
        return self
1291844
function compose(hooks, args, scope) {
  if (!Array.isArray(hooks)) throw new TypeError('Hooks stack must be an array!');
  var promise = Promise.resolve();

  var temp = {
    args: args
  };

  hooks.forEach(function (fn) {
    if (typeof fn !== 'function') throw new TypeError('Hooks must be composed of functions!');
    promise = promise.then(function () {
      return new Promise(function (resolve, reject) {
        function callback(res) {
          if (Array.isArray(res)) {
            temp.args = res;
          }
          resolve(res);
        }

        try {
          var res = fn.apply(scope, temp.args);
          if (res && res.then) {
            res.then(callback, reject);
          } else {
            callback(res);
          }
        } catch (error) {
          reject(error);
        }
      });
    });
  });

  return promise;
}
140737
def python(self, func, *args, **kwargs):
        """"""
        self.ops.append(lambda: func(*args, **kwargs))