fn = $fn; $this->args = $args; } /** * Run the computation. * * @return mixed */ public function compute() { return call_user_func_array($this->fn, $this->args); } /** * Invoke the object as a function. * * @return mixed */ public function __invoke() { return $this->compute(); } }