Version française
Home     About     Download     Resources     Contact us    
Browse thread
[Caml-list] type annotations for function values
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Kenneth Knowles <kknowles@b...>
Subject: Re: [Caml-list] type annotations for function values

The syntax for what you want is:

# let f (x : float) (y : float) : int = 3 in 4;;

You almost had it:

On Thu, Mar 25, 2004 at 08:42:54PM +0100, fis@wiwi.hu-berlin.de wrote:
>   let ((f (x : float) (y : float)) : int) = 3 in 4;;


Kenn

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