Dollar icon indicating copy to clipboard operation
Dollar copied to clipboard

Proposal: Array's fullfill function

Open wongzigii opened this issue 7 years ago • 1 comments

func fullfill(element: Any, count: Int) {
}

let a = [1, 2, 3, 4]
a.fullfill(0, 2) // [1, 2, 3, 4, 0, 0]

fullfill will extend the array with several numbers of elements.

wongzigii avatar Jan 30 '18 13:01 wongzigii

So this function just appends the element, n times towards the end of the array?

ankurp avatar Feb 25 '18 17:02 ankurp