Guest User

Untitled

a guest
Jan 19th, 2019
64
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.34 KB | None | 0 0
  1. let rec add ("nom",accompte) liste =
  2. match (("nom",accompte),liste) with
  3. ((_,_),[]) -> ("nom",accompte)::l
  4. | (("nom",accompte), ("name",acc)::l) ->
  5. match compare (String.lowercase("nom")) (String.lowercase("name")) with
  6. 0 -> l
  7. | (-1) -> ("name",acc)::(add ("nom",accompte) l)
  8. | 1 -> ("nom",accompte)::("name",acc)::l;;
Add Comment
Please, Sign In to add comment