Home > AI > IOS > Combine >

contains(where:)

Example (Apple Offical)

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

Leave a Reply