Created
January 30, 2020 11:43
-
-
Save ramunasjurgilas/0505316447d7058e0964014c0770085c to your computer and use it in GitHub Desktop.
removeDuplicates as filtering operator
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[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