( pubsub: PubSub.PubSub<A> )
| 1517 | * const orderChannel = Channel.fromPubSubArray(orderPubSub) |
| 1518 | * |
| 1519 | * // Transform to process each batch of orders |
| 1520 | * const processedChannel = Channel.map(orderChannel, (orderBatch) => { |
| 1521 | * const totalRevenue = orderBatch.reduce((sum, order) => sum + order.total, 0) |
| 1522 | * const customerCount = new Set(orderBatch.map((order) => |
| 1523 | * order.customerId |
| 1524 | * )).size |