[
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: | Fabrice Marchant <fabricemarchant@f...> |
| Subject: | Re: [Caml-list] Hashtbl: get first n keys |
> 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 However based on the iter / exception you spoke about. Should be easy to adapt this to your problem. Regards, Fabrice