|
let rec lookup x = function |
Many of the functions in assoc.ml can be proxied to OCaml stdlib:
Assoc.lookup => List.assoc_opt
Assoc.remove => List.remove_assoc
Assoc.iter => List.iter (has been done)
Assoc.kmap => List.map
Assoc.fold_left => List.fold_left (has been done)
Assoc.fold_right => List.fold_right (has been done)
Assoc.length => List.length (has been done)
and so on. Is there a reason these are re-implemented by hand?
eff/src/utils/assoc.ml
Line 7 in 4c6bc57
Many of the functions in
assoc.mlcan be proxied to OCaml stdlib:Assoc.lookup=>List.assoc_optAssoc.remove=>List.remove_assocAssoc.iter=>List.iter(has been done)Assoc.kmap=>List.mapAssoc.fold_left=>List.fold_left(has been done)Assoc.fold_right=>List.fold_right(has been done)Assoc.length=>List.length(has been done)and so on. Is there a reason these are re-implemented by hand?