Browse thread
[Caml-list] Why must types be always defined at the top level?
[
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: | David Brown <caml-list@d...> |
| Subject: | Re: [Caml-list] Why must types be always defined at the top level? |
On Thu, Jun 24, 2004 at 09:46:11PM +0200, John Hughes wrote: > defines a function applicable to ALL types? I actually *liked* > being able to say something like > > let f x y z:int = (x = y) && (y = z) You can, you just need parens: # let f x y (z:int) = (x = y) && (y = z) val f : int -> int -> int -> bool = <fun> Dave ------------------- 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