caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: "Rolf Wester" <wester@ilt.fhg.de>
To: caml-list@inria.fr
Subject: [Caml-list] Sample code doesn't work
Date: Mon, 16 Jul 2001 17:43:11 +0200	[thread overview]
Message-ID: <3B5327AF.24111.5E50BF6@localhost> (raw)

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


             reply	other threads:[~2001-07-16 15:43 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-07-16 15:43 Rolf Wester [this message]
2001-07-16 15:51 ` Alain Frisch

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=3B5327AF.24111.5E50BF6@localhost \
    --to=wester@ilt.fhg.de \
    --cc=caml-list@inria.fr \
    /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).