Skip to content

Instantly share code, notes, and snippets.

@baquaz
Last active June 6, 2018 06:17
Show Gist options
  • Select an option

  • Save baquaz/80626a7de2ab070152ac5315591d5432 to your computer and use it in GitHub Desktop.

Select an option

Save baquaz/80626a7de2ab070152ac5315591d5432 to your computer and use it in GitHub Desktop.
Another way to remove item from collection
guard let index = items.index(where: {$0 == item})
else {
return
}
items.remove(at: index)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment