[
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: | Rolf Wester <wester@i...> |
| Subject: | [Caml-list] Sample code doesn't work |
Hi,
I have a problem with the following simple example:
let rec make_account wert0 =
let wert = wert0 in
let add wert_ =
make_account (wert+.wert_)
in
let sub wert_ =
make_account (wert-.wert_)
in
let get () =
wert
in
(add, sub, get);;
When trying to evaluate this I get the error message:
This expression has type
(float -> 'a * 'b * 'c) * (float -> 'a * 'b * 'c) * (unit -> float)
but is here used with type 'a * 'b * 'c
How can I make this work?
Rolf Wester
-------------------------------------
Rolf Wester
wester@ilt.fhg.de
-------------------
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr