src/Traver/Collection/ImmutableVector.php
/**
     * Create a new ImmutableVector from the given traversable.
     * @param array|Traversable $traversable
     * @param bool $preserveKeys
     * @return ImmutableVector
     */
Create a new ImmutableVector from the given traversable.
@param array|Traversable $traversable
@param bool $preserveKeys
@return ImmutableVector
Create a new ImmutableVector from the given traversable . @param array|Traversable $traversable @param bool $preserveKeys @return ImmutableVector
public static function copyOf($traversable, $preserveKeys = true)
    {
        if (is_array($traversable)) {
            return new self(\SplFixedArray::fromArray($traversable, $preserveKeys));
        } else {
            return new self(\SplFixedArray::fromArray(iterator_to_array($traversable), $preserveKeys));
        }
    }
public static function copyOf ( $ traversable , $ preserveKeys = true ) { if ( is_array ( $ traversable ) ) { return new self ( \ SplFixedArray :: fromArray ( $ traversable , $ preserveKeys ) ) ; } else { return new self ( \ SplFixedArray :: fromArray ( iterator_to_array ( $ traversable ) , $ preserveKeys ) ) ; } }
Create a new ImmutableVector from the given traversable.
Create a new ImmutableVector from the given traversable .