- let mem = HT.mem hashtable;;
- let find = HT.find hashtable;;
- let add = HT.add hashtable;;
+ let mem uri cookingsno =
+ try
+ let cooked_list =
+ HT.find hashtable uri
+ in
+ List.mem_assq cookingsno !cooked_list
+ with
+ Not_found -> false
+ ;;
+ let find uri cookingsno =
+ List.assq cookingsno !(HT.find hashtable uri)
+ ;;
+ let add uri cookingsno obj =
+ let cooked_list =
+ try
+ HT.find hashtable uri
+ with
+ Not_found ->
+ let newl = ref [] in
+ HT.add hashtable uri newl ;
+ newl
+ in
+ cooked_list := (cookingsno,obj)::!cooked_list
+ ;;