## Parameters

`module G : G`

## Signature

### Classical big-step iterators

`val iter : (G.V.t -> unit) -> G.t -> unit`

The function is applied each time a node is reached for the first time. Not tail-recursive.

`val iter_component : (G.V.t -> unit) -> G.t -> G.V.t -> unit`

Idem, but limited to a single root vertex.

### Classical folds

`val fold : (G.V.t -> 'a -> 'a) -> 'a -> G.t -> 'a`

The function is applied each time a node is reached for the first time. Not tail-recursive.

`val fold_component : (G.V.t -> 'a -> 'a) -> 'a -> G.t -> G.V.t -> 'a`

Idem, but limited to a single root vertex.

### With the distance to the source

`val fold_component_dist : (G.V.t -> int -> 'a -> 'a) -> 'a -> G.t -> G.V.t -> 'a`
`val iter_component_dist : (G.V.t -> int -> unit) -> G.t -> G.V.t -> unit`

### Step-by-step iterator

See module `Dfs`

`type iterator`
`val start : G.t -> iterator`
`val step : iterator -> iterator`
`val get : iterator -> G.V.t`