caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Karl Zilles <zilles@1969.ws>
To: rbastic@gis.net
Cc: caml-list@inria.fr
Subject: Re: [Caml-list] Clarification of original post [still having problems]
Date: Tue, 22 Apr 2003 12:53:52 -0700	[thread overview]
Message-ID: <3EA59DD0.5010100@1969.ws> (raw)
In-Reply-To: <3ea3174b.37b7.27531@gis.net>

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


  parent reply	other threads:[~2003-04-22 19:48 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-04-20 21:55 Ryan Bastic
2003-04-22 19:46 ` Brian Hurt
2003-04-22 19:53 ` Karl Zilles [this message]
2003-04-22 21:12 Ryan Bastic

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3EA59DD0.5010100@1969.ws \
    --to=zilles@1969.ws \
    --cc=caml-list@inria.fr \
    --cc=rbastic@gis.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).