-
Element count.
Declaration
Swift
var count: Int { get }
-
Returns an element on an
index
position.Declaration
Swift
subscript(index: Int) -> MarcoValue { get set }
-
Inserts an element on an
index
position.Declaration
Swift
func insert(_ value: MarcoValue, at index: Int)
-
Removes an element on an
index
position.Declaration
Swift
func remove(at index: Int)
-
isEmpty
Extension methodTrue if the array is empty.
Declaration
Swift
public var isEmpty: Bool { get }
-
isNotEmpty
Extension methodTrue if the array is not empty.
Declaration
Swift
public var isNotEmpty: Bool { get }
-
add(_:)
Extension methodAppends an element to the array.
Declaration
Swift
public func add(_ value: MarcoValue)
-
elements
Extension methodReturns all elements. The new array instance will be created.
Declaration
Swift
public var elements: [MarcoValue] { get }
-
forEach(_:)
Extension methodIterates over all elements.
Declaration
Swift
public func forEach(_ body: (MarcoValue) throws -> ()) rethrows
-
all(predicate:)
Extension methodReturns
true
ifpredicate
returnstrue
for all elements.Declaration
Swift
public func all(predicate: (MarcoValue) throws -> Bool) rethrows -> Bool
-
none(predicate:)
Extension methodReturns
true
ifpredicate
returnsfalse
for all elements.Declaration
Swift
public func none(predicate: (MarcoValue) throws -> Bool) rethrows -> Bool
-
any(predicate:)
Extension methodReturns
true
ifpredicate
returnstrue
at least for one element.Declaration
Swift
public func any(predicate: (MarcoValue) throws -> Bool) rethrows -> Bool
-
first(where:)
Extension methodReturns the first value for which
predicate
returnstrue
.Declaration
Swift
public func first(where predicate: (MarcoValue) throws -> Bool) rethrows -> MarcoValue?
-
firstIndex(where:)
Extension methodReturns the first value for which
predicate
returnstrue
.Declaration
Swift
public func firstIndex(where predicate: (MarcoValue) throws -> Bool) rethrows -> Int?
-
remove(_:)
Extension methodRemoves an element with a specified
value
.Declaration
Swift
public func remove(_ value: MarcoValue) -> Bool
-
sequence()
Extension methodReturns a
Sequence
representation of the array.Declaration
Swift
public func sequence() -> MarcoArraySequence
-
accept(_:data:)
Extension methodDeclaration
Swift
public func accept<V, D, R>(_ visitor: V, data: D) -> R where V : MarcoVisitor, D == V.Data, R == V.ReturnType