Example (Apple Official):
let cancellable = (0...10).publisher
.collect(5)
.sink { print("\($0)", terminator: "") }
// [0, 1, 2, 3, 4][5, 6, 7, 8, 9][10]
Example (Apple Official):
let cancellable = (0...10).publisher
.collect(5)
.sink { print("\($0)", terminator: "") }
// [0, 1, 2, 3, 4][5, 6, 7, 8, 9][10]