src/precore/util/FluentIterable.php
public function first() : Optional
    {
        try {
            return Optional::ofNullable($this->get(0));
        } catch (OutOfBoundsException $e) {
            return Optional::absent();
        }
    }
public function first() : Optional
    {
        try {
            return Optional::ofNullable($this->get(0));
        } catch (OutOfBoundsException $e) {
            return Optional::absent();
        }
    }
public function first ( ) : Optional { try { return Optional :: ofNullable ( $ this -> get ( 0 ) ) ; } catch ( OutOfBoundsException $ e ) { return Optional :: absent ( ) ; } }
Returns an Optional containing the first element in this fluent iterable.

@return Optional
Returns an Optional containing the first element in this fluent iterable .