Converting elwise_eval into a private function.