From: jhsu1@email.sjsu.edu
To: caml-list@yquem.inria.fr
Subject: Hashtbl.find_all Stack overflow
Date: Mon, 11 Dec 2006 10:18:15 -0800 [thread overview]
Message-ID: <1165861095.457da0e7d507f@web-mail.sjsu.edu> (raw)
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.
reply other threads:[~2006-12-11 18:18 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1165861095.457da0e7d507f@web-mail.sjsu.edu \
--to=jhsu1@email.sjsu.edu \
--cc=caml-list@yquem.inria.fr \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox