* Hashtbl.find_all Stack overflow
@ 2006-12-11 18:18 jhsu1
0 siblings, 0 replies; only message in thread
From: jhsu1 @ 2006-12-11 18:18 UTC (permalink / raw)
To: caml-list
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.
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2006-12-11 18:18 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-12-11 18:18 Hashtbl.find_all Stack overflow jhsu1
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox