[
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: | Chris Hecker <checker@d...> |
| Subject: | Re: [Caml-list] how to start |
> i am a new commer of Caml language. and start with online mannul
> i am confused at this sentence in Chapter 1
># type idref={ mutable id : 'a. 'a -> 'a};;
>what does "." mean?
>why i can not write
># type intidref= { mutable id : int. int->int};;
This is a new feature in the language, and you really don't need to learn
it quite yet if you're just starting out. Basically, before the 'a. syntax
was introduced, there was no way to store some kinds of functions
(polymorphic ones) in datastructures. You don't need int. int->int because
that's not a polymorphic function, so it's just int -> int.
I'd just ignore it for now. :) You should also check out the O'Reilly
book referenced on http://caml.inria.fr
Chris
-------------------
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