public function sort($compare, bool $preserveKeys = true)
    {
        return $this->then(i\iterable_sort, $compare, $preserveKeys);
    }
public function sort($compare, bool $preserveKeys = true)
    {
        return $this->then(i\iterable_sort, $compare, $preserveKeys);
    }
public function sort ( $ compare , bool $ preserveKeys = true ) { return $ this -> then ( i \ iterable_sort , $ compare , $ preserveKeys ) ; }
Sort all elements of an iterator.

@param callable|int $compare       SORT_* flags as binary set or callback comparator function
@param bool         $preserveKeys
@return static
Sort all elements of an iterator .