-
Element count.
Declaration
Swift
var count: Int { get } -
Returns an element on an
indexposition.Declaration
Swift
subscript(index: Int) -> MarcoValue { get set } -
Inserts an element on an
indexposition.Declaration
Swift
func insert(_ value: MarcoValue, at index: Int) -
Removes an element on an
indexposition.Declaration
Swift
func remove(at index: Int)
-
isEmptyExtension methodTrue if the array is empty.
Declaration
Swift
public var isEmpty: Bool { get } -
isNotEmptyExtension 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) -
elementsExtension 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
trueifpredicatereturnstruefor all elements.Declaration
Swift
public func all(predicate: (MarcoValue) throws -> Bool) rethrows -> Bool -
none(predicate:)Extension methodReturns
trueifpredicatereturnsfalsefor all elements.Declaration
Swift
public func none(predicate: (MarcoValue) throws -> Bool) rethrows -> Bool -
any(predicate:)Extension methodReturns
trueifpredicatereturnstrueat least for one element.Declaration
Swift
public func any(predicate: (MarcoValue) throws -> Bool) rethrows -> Bool -
first(where:)Extension methodReturns the first value for which
predicatereturnstrue.Declaration
Swift
public func first(where predicate: (MarcoValue) throws -> Bool) rethrows -> MarcoValue? -
firstIndex(where:)Extension methodReturns the first value for which
predicatereturnstrue.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
Sequencerepresentation 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
MarcoArray Protocol Reference