From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by yquem.inria.fr (Postfix) with ESMTP id BC4FBBB81 for ; Fri, 22 Jul 2005 19:38:35 +0200 (CEST) Received: from pauillac.inria.fr (pauillac.inria.fr [128.93.11.35]) by nez-perce.inria.fr (8.13.0/8.13.0) with ESMTP id j6MHcZWM002175 for ; Fri, 22 Jul 2005 19:38:35 +0200 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 TAA00639 for ; Fri, 22 Jul 2005 19:38:34 +0200 (MET DST) Received: from ux9.sp.cs.cmu.edu (UX9.SP.CS.CMU.EDU [128.2.220.166]) by concorde.inria.fr (8.13.0/8.13.0) with SMTP id j6MHcY8p013936 for ; Fri, 22 Jul 2005 19:38:34 +0200 Received: from c-24-3-154-200.hsd1.pa.comcast.net ([24.3.154.200]) by ux9.sp.cs.cmu.edu id aa24686; 22 Jul 2005 10:52 EDT Received: from ecc by stratocaster.home with local (Exim 4.52) id 1Dvysn-0001jR-JA; Fri, 22 Jul 2005 10:52:13 -0400 Date: Fri, 22 Jul 2005 10:52:13 -0400 To: caml-list@yquem.inria.fr, caml-list@inria.fr Subject: Re: [Caml-list] How to do this properly with OCaml? Message-ID: <20050722145213.GC5992@localhost> Mail-Followup-To: caml-list@yquem.inria.fr, caml-list@inria.fr References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.9i From: Eric Cooper X-Miltered: at nez-perce with ID 42E12F1B.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Miltered: at concorde with ID 42E12F1A.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Spam: no; 0.00; caml-list:01 ocaml:01 arrays:01 ...:98 ...:98 wrote:01 library:03 let:03 jul:05 problem:05 fri:05 concat:05 concat:05 tries:06 standard:07 X-Spam-Checker-Version: SpamAssassin 3.0.3 (2005-04-27) on yquem.inria.fr X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=disabled version=3.0.3 On Fri, Jul 22, 2005 at 04:26:55PM +0200, Thomas Fischbacher wrote: > [...] > The very same problem appears in a different guise when one tries to write > a function that flattens 'a array array -> 'a array. The best I could > come up with here is: > [...] > Could anyone please tell me how to do all this in a more appropriate way? let join_arrays aa = Array.concat (Array.to_list aa) (although Array.concat in the standard library is basically equivalent to your code) -- Eric Cooper e c c @ c m u . e d u