## Parameters

`module G : sig ... end`

## Signature

`val iter : (G.V.t -> int -> unit) -> G.t -> zero:(G.E.t -> bool) -> G.V.t -> unit`

`iter f g zero s` performs a 0-1 BFS on graph `g`, from the source vertex `s`, and applies `f` to each visited vertex and its distance from the source. Function `zero` indicates 0-edges. All reachable vertices are visited, in increasing order of distance to the source.