pub fn sequence<G, N, V, F>(
    state: &Collection<G, (N, V)>,
    edges: &Collection<G, (N, N)>,
    logic: F
) -> Collection<G, (N, Option<V>)>
where G: Scope, G::Timestamp: Lattice + Hash + Ord, N: ExchangeData + Hashable, V: ExchangeData, F: Fn(&N, &[(&V, isize)]) -> V + 'static,
Expand description

Applies logic to nodes sequentially, in order of node identifiers.

The logic function updates a node’s state as a function of its neighbor states. It will only be called on complete input.

Internally, this method performs a fixed-point computation in which a node “fires” once all of its neighbors with lower identifier have fired, and we apply logic to the new state of lower neighbors and the old state (input) of higher neighbors.