Skip to content

Instantly share code, notes, and snippets.

@Arrlindii
Created June 22, 2019 19:42
Show Gist options
  • Select an option

  • Save Arrlindii/ca59d36c87387fa10f51dc5090a40eb9 to your computer and use it in GitHub Desktop.

Select an option

Save Arrlindii/ca59d36c87387fa10f51dc5090a40eb9 to your computer and use it in GitHub Desktop.
_ = Publishers.Sequence(sequence: [1,2,2,3,3,4,7])
.map { $0 * 2 }
.flatMap { Publishers.Just($0) }
.filter { $0.isMultiple(of: 2) }
.dropFirst(3)
.removeDuplicates()
.sink(receiveValue: { value in
print(value)
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment