public function last()
    {
        $this->throwExceptionIfEmpty();

        $keys = $this->keys();
        $keyOfTheLastElement = $keys->pop();
        return $this->offsetGet($keyOfTheLastElement);
    }