caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Frank Atanassow <franka@cs.uu.nl>
To: Costin Stefan <costins@auctionwatch.ro>
Cc: caml-list@inria.fr
Subject: Re: [Caml-list] list in functional style
Date: Tue, 7 Aug 2001 14:42:28 +0200	[thread overview]
Message-ID: <20010807144228.C26097@cs.uu.nl> (raw)
In-Reply-To: <3B6FB7E3.8FD8903@auctionwatch.ro>; from costins@auctionwatch.ro on Tue, Aug 07, 2001 at 12:41:55PM +0300

Costin Stefan wrote (on 07-08-01 12:41 +0300):
> I have the following problem : want to define lists but using only
> functions :

Sorry, I was not reading very carefully and now recognize that my post was a
complete non-answer.

> So why the type of the result of hd may be the same of the type of the
> result of tl !
> 
> Why the type of the result of a cons isn't a polymorphic function ?

Type variables of the form '_a are not generalized; they can be instantiated
only once. This is a conservative criterion to ML-like languages use to handle
the interaction between polymorphism and imperative side-effects.

You can read about it in the FAQ:

  http://caml.inria.fr/FAQ/FAQ_EXPERT-eng.html#variables_de_types_faibles

-- 
Frank Atanassow, Information & Computing Sciences, Utrecht University
Padualaan 14, PO Box 80.089, 3508 TB Utrecht, Netherlands
Tel +31 (030) 253-3261 Fax +31 (030) 251-379
-------------------
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


      parent reply	other threads:[~2001-08-07 12:42 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-08-07  9:41 Costin Stefan
2001-08-07 12:23 ` Frank Atanassow
2001-08-07 12:42 ` Frank Atanassow [this message]

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=20010807144228.C26097@cs.uu.nl \
    --to=franka@cs.uu.nl \
    --cc=caml-list@inria.fr \
    --cc=costins@auctionwatch.ro \
    /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).