Guest User

Untitled

a guest
Jan 17th, 2019
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
OCaml 0.38 KB | None | 0 0
  1. let rec  add (client,acompte1) liste =
  2.   match liste  with
  3.       []                                      -> (client,acompte1) :: []
  4.     | (nom,acompte2)::list when client = nom  -> failwith "ce compte existe deja"
  5.     | (nom,acompte2)::list when client > nom  -> add (client,acompte1) list
  6.     | (nom,acompte2)::list                    -> (client,acompte1)::(nom,acompte2)::list;;
Add Comment
Please, Sign In to add comment