Strongly_con..._components.S(3)

✨ NAME ✨

okay bestie, this is Strongly_connected_components.S from the OCaml library, and the description is literally “no description” 😭 — not me opening a manpage to find zero clues. Anyway, here’s the whole thing, and we’re gonna keep every detail.

🧩 Module type 🧩

Module type Strongly_connected_components.S — yep, that’s the module type in question, main character energy.

📚 Documentation 📚

🌸 Module type S 🌸

The module type S is exactly this, no cap:

Module type S
 = sig end

Then we’ve got this absolute icon:

module Id : Identifiable.S

And this type, which is giving map-of-sets realness:

type directed_graph = Id.Set.t Id.Map.t

okay so if (a -> set) belongs to the map, that means there are edges from a to every element of set.

it is assumed that no edge points to a vertex not represented in the map — periodt, don’t violate that vibe check.

Now the component type has two moods, and they are:

type component =
  | Has_loop of Id.t list
  | No_loop of Id.t

Then the values, copied exactly because we respect the code:

val connected_components_sorted_from_roots_to_leaf : directed_graph ->
       component array
val component_graph : directed_graph -> (component * int list) array

okay that’s the whole page bestie 💖 source/version is OCamldoc and the date is 2026-06-22, so that’s the cute sign-off ✨💅

📦 where this page comes from