type coordonnee = float * float;; type logarithme = Ln of float;; type compte_en_banque = {nom : string; mutable solde : float};; let ex1 = {nom = "toto"; solde = 100.0};; (*Ajouter 20 sur le solde de toto*) let ajouter_solde c s = c.solde <- c.solde +. s;; ajouter_solde ex1 20.0;; (*Retirer 20 sur le solde de toto*) type 'a pile = PileVide | Ajout of 'a * 'a pile;; let pile1 = Ajout(1, Ajout(2, Ajout(3, PileVide)));; let rec somme_pile p = match p with | PileVide -> 0 | Ajout(x, p') -> x + somme_pile p';;