Skip to content

Instantly share code, notes, and snippets.

@satan87
Created June 18, 2020 15:13
Show Gist options
  • Save satan87/b107ea7dac10f5315bf8c29aad1bb3d9 to your computer and use it in GitHub Desktop.
Save satan87/b107ea7dac10f5315bf8c29aad1bb3d9 to your computer and use it in GitHub Desktop.
switch filters.byFavorite {
case .favorite:
bookFiltered.removeAll(where: {!$0.favorite})
case .notFavorite:
bookFiltered.removeAll(where: {$0.favorite})
default:
break
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment