Browse thread
[Caml-list] Clarification of original post [still having problems]
-
Ryan Bastic
- Brian Hurt
- Karl Zilles
[
Home
]
[ Index:
by date
|
by threads
]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
| Date: | -- (:) |
| From: | Karl Zilles <zilles@1...> |
| Subject: | Re: [Caml-list] Clarification of original post [still having problems] |
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