Version française
Home     About     Download     Resources     Contact us    
Browse thread
Re: [Caml-list] Type inference + optional parameters
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: brogoff@s...
Subject: Re: [Caml-list] Type inference + optional parameters
On Tue, 2 Sep 2003, Christoph Bauer wrote:
> Sorry, but what are the benefits of these functions over the original
> function without the optional parameter? 

None. I was being facetious, sorry. 

> I need a conversion function conv:'a -> 'b and the default value should be 
> the identity.

There is no suitable default suitable conversion function of that type (think 
about it for a minute and you'll understand), so there is no good way to make 
an optional argument of type ('a -> 'b). 

-- Brian


-------------------
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