From: Fabrice Marchant <fabrice.marchant@orange.fr>
To: caml-list@yquem.inria.fr
Subject: Re: [Caml-list] Hashtbl: get first n keys
Date: Tue, 11 Dec 2007 16:40:11 +0100 [thread overview]
Message-ID: <20071211164011.16469000@localhost.localdomain> (raw)
In-Reply-To: <475E50E6.4060501@menta.net>
> Please, could someone suggest a way to get "n" keys of a hash table? No
> order nor other restriction about the keys, just "n " keys existing in
> the table.
>
> A method based on "iter" and raise and exception when limit is reached
> seems possible, but could be there are better options.
Hi !
A particular case - n = 1 - , for a hashSet that lacked a function to exhibit one some element :
http://tech.groups.yahoo.com/group/ocaml_beginners/message/8088
Based on the iter / exception however.
Should be easy to adapt this to your problem.
Regards,
Fabrice
next prev parent reply other threads:[~2007-12-11 16:36 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-12-11 8:57 tmp123
2007-12-11 15:40 ` Fabrice Marchant [this message]
2007-12-11 15:42 ` [Caml-list] " Fabrice Marchant
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=20071211164011.16469000@localhost.localdomain \
--to=fabrice.marchant@orange.fr \
--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