View Source Skitter.BIO.KeyedReduce (Skitter v0.6.2)

Keyed Reduce operation.

This operation implements a reduce operation. It accepts three arguments wrapped in a tuple when embedded inside a workflow: a key function, a reduce function and an initial state. When this operation receives data, the key function is called with the received data as its first argument. The key function should return a key, which is used to obtain the state associated with the key. Afterwards, the reduce function is called with the received data as its first argument and the state associated with the key returned by the key function as its second argument. The function should then return a new state, which will be associated with the key. The returned state will also be emitted on the _ out port.

operation-properties

Operation Properties