Browse thread
[Caml-list] type annotations for function values [Answer]
- fis@w...
[
Home
]
[ Index:
by date
|
by threads
]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
| Date: | -- (:) |
| From: | fis@w... |
| Subject: | [Caml-list] type annotations for function values [Answer] |
i wrote: > [...] > which is horribly inelegant. why can't i do something like this? > > let ((f x y) : (float -> float -> int)) = 3 in 4;; thanks for all your replies. here is the solution: let f (x : float) (y : float) : int = 3 in 4 regards, matthias ------------------- 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