Reactive Programming in iOS with Combine

Feb 4 2021 Swift 5.3, macOS 11.0, Xcode 12.2

Part 2: Transforming & Filtering Operators

12. Challenge: Filter All the Things

Lesson Complete

Play Next Lesson
Save for later
About this episode

See course reviews

See forum comments
Cinema mode Mark as Complete Download course materials
Previous episode: 11. More Filtering Operators Next episode: 13. Conclusion

This video was last updated on Feb 4 2021

Heads up... You've reached locked video content where the transcript will be shown as obfuscated text.

You can unlock the rest of this video course, and our entire catalogue of books and videos, with a Professional subscription.

You’ve learned all about Filtering Operators - so now it’s time for a challenge. For this challenge: create a publisher that emits a collection of numbers from 1 to 100.

let numbers = (1...100).publisher

  .filter({ $0 % 2 == 0})
  .sink(receiveValue: { print($0) })
  .store(in: &subscriptions)