let of_list ?size:(size=default_size) alist = let h : ('a,'b) t = new hashmap ~size () in h#add_list alist; h