src/Map.php
public function last(): Pair
    {
        if ($this->isEmpty()) {
            throw new UnderflowException();
        }

        return $this->pairs[count($this->pairs) - 1];
    }
public function last(): Pair
    {
        if ($this->isEmpty()) {
            throw new UnderflowException();
        }

        return $this->pairs[count($this->pairs) - 1];
    }
public function last ( ) : Pair { if ( $ this -> isEmpty ( ) ) { throw new UnderflowException ( ) ; } return $ this -> pairs [ count ( $ this -> pairs ) - 1 ] ; }
Return the last Pair from the Map

@return Pair

@throws UnderflowException
Return the last Pair from the Map