private function generate() { $function = $this->function; $this->current = $function($this->index); }