forEach(_:)

forEach(_:)

forEach(_:) Instance Method of XPCArray Calls the given closure with an index and element of the array in the same order as a for-in loop.

func forEach(_ body: (Int, xpc_object_t) throws -> Void) rethrows

Parameters

body

A closure that takes an index and an element of the sequence as parameters.

Discussion