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.7 required=5.0 tests=AWL,DNS_FROM_RFC_POST, HTML_MESSAGE,SPF_NEUTRAL autolearn=disabled version=3.1.3 Received: from mail4-relais-sop.national.inria.fr (mail4-relais-sop.national.inria.fr [192.134.164.105]) by yquem.inria.fr (Postfix) with ESMTP id 3DE75BBB7 for ; Tue, 5 Aug 2008 14:31:03 +0200 (CEST) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AjoCAHvjl0hA6ba9lGdsb2JhbACCJzCOIz4BAQEBCQMKBxEDlmiFaA X-IronPort-AV: E=Sophos;i="4.31,310,1215381600"; d="scan'208";a="27961973" Received: from nf-out-0910.google.com ([64.233.182.189]) by mail4-smtp-sop.national.inria.fr with ESMTP; 05 Aug 2008 14:25:10 +0200 Received: by nf-out-0910.google.com with SMTP id b11so778972nfh.13 for ; Tue, 05 Aug 2008 05:25:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:cc:in-reply-to:mime-version:content-type:references; bh=8v1rY4UvBgYsxh5SnJgaRa/ABaj1nggYx/LJ25dbgd8=; b=hRbDqXpBf8IMXyX+1ZoERjcN7YFG4WU+xjKRHMjncpAIofGP4300E7lbCwaYqyUQC0 4oCEzzChXhEY96J1FciDsS9bLc0Fp7VAc5IgDziK9CTBgXtZUg7nqcb8xwrmZvskp93j xNGbvQ3C9LiU2yzIIveewG0I8vwlifIsfTFnk= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:cc:in-reply-to:mime-version :content-type:references; b=qvUP3VFEdgZhCp3CE5yUUtqeauXY+ZHYGd62IOvLisaALwbh3P53VCD0IHFRfr6KHk lpPZrp4O+glLKd6HURqMdJnF5DfrZ7DS8YbDIeWxy2gTtAyTSHaENha58mItK1t7RzpQ ZccwLJLR69E46tKuDJ41Y/W5ihZE4RvtWiIcg= Received: by 10.210.40.10 with SMTP id n10mr929118ebn.116.1217939109659; Tue, 05 Aug 2008 05:25:09 -0700 (PDT) Received: by 10.210.72.8 with HTTP; Tue, 5 Aug 2008 05:25:09 -0700 (PDT) Message-ID: <527cf6bc0808050525x5d574e5ek4b7acbc4e114307e@mail.gmail.com> Date: Tue, 5 Aug 2008 14:25:09 +0200 From: "blue storm" To: "Brighten Godfrey" Subject: Re: [Caml-list] Getting an element of a hashtable: simple ... or is it? Cc: caml-list@yquem.inria.fr In-Reply-To: <94C5D65F-7CA4-48FF-B4AA-E88E82F6C8E1@cs.berkeley.edu> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_45677_23550010.1217939109681" References: <94C5D65F-7CA4-48FF-B4AA-E88E82F6C8E1@cs.berkeley.edu> X-Spam: no; 0.00; hashtable:01 hashtbl:01 enum:01 hashtbl:01 enum:01 val:01 val:01 storm:98 caml-list:01 blue:96 element:03 let:03 let:03 use:16 use:16 ------=_Part_45677_23550010.1217939109681 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline With Extlib you can use : let get_one hashtbl = Enum.peek (Hashtbl.enum hashtbl) val get_one : ('a, 'b) Hashtbl.t -> ('a * 'b) option ------=_Part_45677_23550010.1217939109681 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline
With Extlib you can use :
let get_one hashtbl = Enum.peek (Hashtbl.enum hashtbl)
val get_one : ('a, 'b) Hashtbl.t -> ('a * 'b) option
------=_Part_45677_23550010.1217939109681--