code: public function first() : Optional
      {
          try {
              return Optional::ofNullable($this->get(0));
          } catch (OutOfBoundsException $e) {
              return Optional::absent();
          }
      }
docs: Returns an Optional containing the first element in this fluent iterable.
  
  @return Optional