Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Proposal: Array's fullfill function #261

Open
wongzigii opened this issue Jan 30, 2018 · 1 comment
Open

Proposal: Array's fullfill function #261

wongzigii opened this issue Jan 30, 2018 · 1 comment

Comments

@wongzigii
Copy link

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.

@ankurp
Copy link
Owner

ankurp commented Feb 25, 2018

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants