This commit is contained in:
Le_Foucheur committed 2024-09-15 22:10:50 +02:00
1 parent bd49911eca
commit e3de01bde8
3742 files changed
+64316

No files matched your search

@@ -0,0 +1,8 @@
type 'a arbre = Vide | Noeud of 'a * 'a arbre * 'a arbre
let rec hauteur a = match a with
|Vide -> -1
|Noeud(_,g,d) -> 1 + max (hauteur g) (hauteur d)
let a = Noeud('a', Noeud('r', Noeud('t',Vide, Vide), Vide), Noeud('b', Vide, Vide))
let _ = hauteur a
@@ -0,0 +1 @@
{"version":1,"resource":"file:///home/jvj/TP_Info/tp00_erreurs_ocaml/1_arbres_types.ml","entries":[{"id":"krbd.ml","timestamp":1725633322317},{"id":"YqqN.ml","timestamp":1725633429484}]}
@@ -0,0 +1,8 @@
type 'a arbre = Vide | Noeud of 'a * 'a arbre * 'a arbre
let rec hauteur a = match a with
|V -> -1
|Noeud(_,g,d) -> 1 + max (hauteur g) (hauteur d)
let a = Noeud('a', Noeud('r', Noeud('t',Vide, Vide), Vide), Noeud('b', Vide, Vide))
let _ = hauteur a