src/Map.php
public function keys(): Set
    {
        $key = function($pair) {
            return $pair->key;
        };

        return new Set(array_map($key, $this->pairs));
    }
public function keys(): Set
    {
        $key = function($pair) {
            return $pair->key;
        };

        return new Set(array_map($key, $this->pairs));
    }
public function keys ( ) : Set { $ key = function ( $ pair ) { return $ pair -> key ; } ; return new Set ( array_map ( $ key , $ this -> pairs ) ) ; }
Returns a set of all the keys in the map.

@return Set
Returns a set of all the keys in the map .