Initializer

init(count:initialized_with:)

Creates an array whose contents are the results, of calling initialize with the values 0 ..< count, in order.

Source
init<E>(
   count: Int,
   initialized_with initialize: inout [E] (Int) inout -> Element
)

Details

initialize accepts an index and returns the element that should be inserted at that index.

Preconditions

  • count >= 0.