Module WeakTopologicalOrder.Partition

type 'node t = private
  1. | Empty
  2. | Node of {
    1. node : 'node;
    2. next : 'node t;
    }
  3. | Component of {
    1. head : 'node;
    2. rest : 'node t;
    3. next : 'node t;
    }
val fold_nodes : ('node t, 'node, _) IStdlib.IStd.Container.fold
val iter_nodes : 'a t -> f:('a -> unit) -> unit
val fold_heads : ('node t, 'node, _) IStdlib.IStd.Container.fold
val expand : fold_right:('a, 'b, 'b t) IStdlib.IStd.Container.fold -> 'a t -> 'b t

Maps a partition nodes from 'a to 'b using the expansion fold_right. fold_right should not return its ~init directly but must always provide a non-empty sequence.

val pp : pp_node:(F.formatter -> 'node -> unit) -> F.formatter -> 'node t -> unit