From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (from majordomo@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id OAA25262; Tue, 7 Aug 2001 14:42:30 +0200 (MET DST) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id OAA25197 for ; Tue, 7 Aug 2001 14:42:29 +0200 (MET DST) Received: from mail.cs.uu.nl (sunset.cs.uu.nl [131.211.80.32]) by concorde.inria.fr (8.11.1/8.10.0) with ESMTP id f77CgS518558 for ; Tue, 7 Aug 2001 14:42:28 +0200 (MET DST) Received: from silvester.cs.uu.nl (silvester.cs.uu.nl [131.211.80.119]) by mail.cs.uu.nl (Postfix) with SMTP id 4EA8F4521; Tue, 7 Aug 2001 14:42:28 +0200 (MET DST) Received: by silvester.cs.uu.nl (sSMTP sendmail emulation); Tue, 7 Aug 2001 14:42:28 +0200 Date: Tue, 7 Aug 2001 14:42:28 +0200 From: Frank Atanassow To: Costin Stefan Cc: caml-list@inria.fr Subject: Re: [Caml-list] list in functional style Message-ID: <20010807144228.C26097@cs.uu.nl> References: <3B6FB7E3.8FD8903@auctionwatch.ro> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <3B6FB7E3.8FD8903@auctionwatch.ro>; from costins@auctionwatch.ro on Tue, Aug 07, 2001 at 12:41:55PM +0300 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk 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