From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (from majordomo@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id FAA17638; Wed, 5 Nov 2003 05:30:58 +0100 (MET) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id FAA16973 for ; Wed, 5 Nov 2003 05:30:57 +0100 (MET) Received: from bob.west.spy.net (mail.west.spy.net [66.149.231.226]) by concorde.inria.fr (8.11.1/8.11.1) with ESMTP id hA54Ut114212 for ; Wed, 5 Nov 2003 05:30:56 +0100 (MET) Received: from [192.168.1.196] (dhcp-196.west.spy.net [192.168.1.196]) by bob.west.spy.net (Postfix) with ESMTP id 813ED58C6 for ; Tue, 4 Nov 2003 20:30:53 -0800 (PST) Mime-Version: 1.0 (Apple Message framework v606) Content-Transfer-Encoding: 7bit Message-Id: Content-Type: text/plain; charset=US-ASCII; format=flowed To: Caml Mailing List From: Dustin Sallings Subject: [Caml-list] cadr? Date: Tue, 4 Nov 2003 20:30:53 -0800 X-Mailer: Apple Mail (2.606) X-Loop: caml-list@inria.fr X-Spam: no; 0.00; cadr:01 stupid:01 hashtbl:01 figuring:01 val:01 endline:01 int:01 int:01 string:03 string:03 let:04 seems:05 converting:05 i'm:07 fun:08 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk This seems like a stupid question, but in my endless search for performance, I tried converting a hashtbl to an assoc list (since it's only got four predefined elements). I'm having trouble figuring out what to do with this thing (other than assoc): let tmp = List.map (fun x -> (x, "hi" ^ (string_of_int x))) [1; 2; 3; 4; 5];; val tmp : (int * string) list = [(1, "hi1"); (2, "hi2"); (3, "hi3"); (4, "hi4"); (5, "hi5")] I want to do something like this: List.map (function x -> print_endline(List.nth x 1)) tmp;; What am I missing? -- Dustin Sallings ------------------- To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/ Beginner's list: http://groups.yahoo.com/group/ocaml_beginners