Files
dotfile/.config/Code/User/History/523f648c/krbd.ml
T
2024-09-15 22:10:50 +02:00

9 lines
256 B
OCaml

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