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 VAA23039; Tue, 22 Apr 2003 21:48:39 +0200 (MET DST) 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 VAA22700 for ; Tue, 22 Apr 2003 21:48:38 +0200 (MET DST) Received: from woodstock.1969.ws (64-215-156-42.eosinc.net [64.215.156.42]) by concorde.inria.fr (8.11.1/8.11.1) with SMTP id h3MJmav16365 for ; Tue, 22 Apr 2003 21:48:37 +0200 (MET DST) Received: (qmail 12611 invoked from network); 22 Apr 2003 19:29:50 -0000 Received: from karl.1969.ws (HELO 1969.ws) (10.3.2.15) by woodstock.1969.ws with SMTP; 22 Apr 2003 19:29:50 -0000 Message-ID: <3EA59DD0.5010100@1969.ws> Date: Tue, 22 Apr 2003 12:53:52 -0700 From: Karl Zilles Organization: 1969 Communications, Inc. User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.3) Gecko/20030312 X-Accept-Language: en-us, en MIME-Version: 1.0 To: rbastic@gis.net CC: caml-list@inria.fr Subject: Re: [Caml-list] Clarification of original post [still having problems] References: <3ea3174b.37b7.27531@gis.net> In-Reply-To: <3ea3174b.37b7.27531@gis.net> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Spam: no; 0.00; caml-list:01 funtion:01 foo:01 arrays:01 ocaml:01 rec:01 wrote:03 recursive:03 let:04 array:04 integers:05 integer:06 confuse:08 returned:88 operator:12 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk Ryan Bastic wrote: > The specific problems that confuse me is that > > let rec group' ... in Array.of_list is all part of the same expression, > so how does Ocaml > let front :: group' n rest work?? It is a recursive funtion call. Is this clear? > firstN n input returns two arrays, and as far as my > understanding goes, :: is a list concatenation operator. How then, does > this work? :: is a list building primitive. If you have a list of integers (ilist) and you want to add an integer (newi) to the front, you would use: newi :: ilist So in general you add a foo to a foolist with (foo::foolist). In your case, we are adding an array to a list of arrays. front is the first array returned by the earlier call to firstN. group' returns a list of arrays. ------------------- 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