Skip to content

Instantly share code, notes, and snippets.

@ramunasjurgilas
Created January 30, 2020 11:43
Show Gist options
  • Save ramunasjurgilas/0505316447d7058e0964014c0770085c to your computer and use it in GitHub Desktop.
Save ramunasjurgilas/0505316447d7058e0964014c0770085c to your computer and use it in GitHub Desktop.
removeDuplicates as filtering operator
[1,1,2,1,1,3]
.publisher
.removeDuplicates()
.sink { print($0) }
// Output:
// 1
// 2
// 1
// 3
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment