Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- let rec fusion (liste1,liste2) =
- match (liste1,liste2) with
- ([],l) | (l,[]) -> l
- | ((nom1,accompte1)::l1,(nom2,accompte2)::l2) ->
- match compare nom1 nom2 with
- 0 -> (nom1,accompte1 +. accompte2)::fusion (l1,l2)
- | (-1) -> (nom1,accompte1)::fusion (l1,liste2)
- | _ -> (nom2,accompte2)::fusion (liste1,l2);;
Add Comment
Please, Sign In to add comment