Version française
Home     About     Download     Resources     Contact us    
Browse thread
[Caml-list] Polymorphism and the "for" loop
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: William Lovas <wlovas@s...>
Subject: Re: [Caml-list] Polymorphism and the "for" loop
On Fri, Oct 22, 2004 at 11:19:53AM +1000, skaller wrote:
> On Fri, 2004-10-22 at 05:11, David Brown wrote:
> > On Thu, Oct 21, 2004 at 07:50:43PM +0100, Jon Harrop wrote:
> 
> > Because its only a warning, not an error.  g is allowed to return any type.
> > It could be argued that the loop expression must be of type unit, then this
> > could also be inferred by type inference.
> 
> It can also be argued chosing unit for non-returning function
> is the wrong choice and that correct choice is void.

Certainly.  But whoever mentioned non-returning functions?

William

-------------------
To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners