Array
struct Array<Element> : RandomAccessCollection, MutableCollection
-
Creates an array from the Perl array.
Throws
If some of the elements not exist or cannot be converted to
Element
.Complexity
O(n), where n is the count of the array.
Declaration
Swift
public init(_ av: PerlArray) throws
Parameters
av
The Perl array with the elements compatible with
Element
. -
Creates an array from the reference to the Perl array.
Throws
If
ref
is not a reference to a Perl array or some of the elements not exist or cannot be converted toElement
.Complexity
O(n), where n is the count of the array.
Declaration
Swift
public init(_ ref: PerlScalar) throws
Parameters
ref
The reference to the Perl array with the elements compatible with
Element
.