From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on yquem.inria.fr X-Spam-Level: * X-Spam-Status: No, score=1.9 required=5.0 tests=DNS_FROM_RFC_ABUSE, DNS_FROM_RFC_POST autolearn=disabled version=3.1.3 Received: from mail1-relais-roc.national.inria.fr (mail1-relais-roc.national.inria.fr [192.134.164.82]) by yquem.inria.fr (Postfix) with ESMTP id 01ACABC6B for ; Tue, 11 Dec 2007 09:57:27 +0100 (CET) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AgAAACLgXUc+KuYMfGdsb2JhbACPZwIJAggPEwc X-IronPort-AV: E=Sophos;i="4.24,150,1196636400"; d="scan'208";a="5511173" Received: from unknown (HELO resmaa04.ono.com) ([62.42.230.12]) by mail1-smtp-roc.national.inria.fr with ESMTP; 11 Dec 2007 09:57:27 +0100 Received: from [159.23.98.243] (192.146.187.87) by resmaa04.ono.com (7.3.118.8) (authenticated as tmp123@menta.net) id 475D2F8A00073A88 for caml-list@yquem.inria.fr; Tue, 11 Dec 2007 09:57:18 +0100 Message-ID: <475E50E6.4060501@menta.net> Date: Tue, 11 Dec 2007 09:57:10 +0100 From: tmp123 User-Agent: Thunderbird 2.0.0.9 (Windows/20071031) MIME-Version: 1.0 To: caml-list@yquem.inria.fr Subject: Hashtbl: get first n keys Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Spam: no; 0.00; hashtbl:01 hash:01 iter:01 exception:01 seems:03 raise:03 tmp:05 tmp:05 restriction:05 table:93 table:93 but:14 keys:15 keys:15 method:17 Hello, 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.