Browse thread
Hashtbl.find_all Stack overflow
- jhsu1@e...
[
Home
]
[ Index:
by date
|
by threads
]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
| Date: | -- (:) |
| From: | jhsu1@e... |
| Subject: | Hashtbl.find_all Stack overflow |
I get a stack overflow with the following <PRE> let var_lookup = Hashtbl.create 997;; (* ... *) let keys h = Hashtbl.fold (fun key data accu -> if not (List.mem key accu) then key :: accu else accu) h [] in let files = keys var_lookup in let helper file = (let vars = Hashtbl.find_all var_lookup file in let run_tpl var = print_string var in List.iter run_tpl vars) in List.iter helper files; </PRE> Only when Hashtbl.find_all is executed enough times.