Home > AI > Uncategorized

filtering

_ = 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)
    })

For above example, what values are output?

Related posts:

Leave a Reply