Added tools

This commit is contained in:
Angela Liu 2025-11-19 10:43:41 +01:00
parent 310c42d911
commit 6612e7deb1
2 changed files with 12 additions and 0 deletions

7
src/tools.ml Normal file
View file

@ -0,0 +1,7 @@
(* Yes, we have to repeat open Graph. *)
open Graph
(* assert false is of type ∀α.α, so the type-checker is happy. *)
let clone_nodes _gr = assert false
let gmap _gr _f = assert false
(* Replace _gr and _f by gr and f when you start writing the real function. *)

5
src/tools.mli Normal file
View file

@ -0,0 +1,5 @@
open Graph
val clone_nodes: 'a graph -> 'b graph
val gmap: 'a graph -> ('a -> 'b) -> 'b graph
val add_arc: int graph -> id -> id -> int -> int graph