src/GeneratorCollection.php
public function flip(): CollectionInterface
    {
        return $this->wrap(function (Iterator $data) {
            foreach ($data as $key => $item) {
                yield $item => $key;
            }
        });
    }
public function flip(): CollectionInterface
    {
        return $this->wrap(function (Iterator $data) {
            foreach ($data as $key => $item) {
                yield $item => $key;
            }
        });
    }
public function flip ( ) : CollectionInterface { return $ this -> wrap ( function ( Iterator $ data ) { foreach ( $ data as $ key => $ item ) { yield $ item => $ key ; } } ) ; }
Flip the items in the collection.

@return CollectionInterface
Flip the items in the collection .