Initial data commit

This commit is contained in:
Ingy döt Net 2023-07-01 11:58:00 -04:00
parent 72d218235f
commit f23f22d71c
199087 changed files with 3378941 additions and 0 deletions

View file

@ -0,0 +1,22 @@
let l1 : assoc list = [
("name", TString "Rocket Skates");
("price", TFloat 12.75);
("color", TString "yellow")
] ;;
let l2 : assoc list = [
("price", TFloat 15.25);
("color", TString "red");
("year", TInt 1974)
] ;;
let rec merge_assoc_list (base_list : assoc list) (add_list : assoc list) : assoc list =
List.fold_left
(fun l (key, val_) ->
(key, val_) :: (List.remove_assoc key l)
)
base_list
add_list
;;
let l' = merge_assoc_list l1 l2 ;;