Version française
Home     About     Download     Resources     Contact us    

This site is updated infrequently. For up-to-date information, please visit the new OCaml website at

Browse thread
Hashtbl: get first n keys
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2007-12-11 (08:57)
From: tmp123 <tmp123@m...>
Subject: 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.

Thanks a lot.