Example (Apple Offical) let numbers = [-1, 0, 10, 5] numbers.publisher .contains {$0 > 4} .sink { print("\($0)") }