Mailing list for all users of the OCaml language and system.
 help / color / mirror / Atom feed
From: micha <micha-1@fantasymail.de>
To: caml-list@inria.fr
Subject: typing question
Date: Tue, 24 Apr 2007 20:14:35 +0200	[thread overview]
Message-ID: <20070424201435.38f2f5f9@hmmm.de> (raw)

Hi,

why is the type of register1  'a -> string but the type of register2
_'a -> string?


cheers
 Michael



let symbol_id = ref 0;;
let register1 fkt =
    let name = "symbol-" ^ (string_of_int !symbol_id) in
    incr symbol_id;
    Callback.register name fkt;
    name
;;

let register2 =
    let symbol_id = ref 1 in
    fun fkt -> let name = "symbol-" ^ (string_of_int !symbol_id) in
    incr symbol_id;
    Callback.register name fkt;
    name
;;


             reply	other threads:[~2007-04-24 18:14 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-04-24 18:14 micha [this message]
2007-04-24 22:22 ` [Caml-list] " Philippe Wang
  -- strict thread matches above, loose matches on Subject: below --
1999-10-25 15:07 Typing question Sylvain
1999-10-26  8:02 ` Sven LUTHER
1999-10-26 10:35   ` Sylvain
1999-10-26 18:16 ` skaller
1999-10-28 18:15 ` Jerome Vouillon

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=20070424201435.38f2f5f9@hmmm.de \
    --to=micha-1@fantasymail.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