Browse thread
[Caml-list] Multiparameter functors?
[
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: | 2003-12-22 (23:56) |
From: | David Brown <caml-list@d...> |
Subject: | Re: [Caml-list] Multiparameter functors? |
On Mon, Dec 22, 2003 at 04:04:15PM -0700, Matt Gushee wrote: > Is there anything obvious about functors? ;-) > > I've found the following syntax to work: > > module Make = > functor (Key:Map.OrderedType) -> functor (Pri:Map.OrderedType) -> > struct > .... > end;; This is very similar to currying of functions, except that Ocaml doesn't give you nice convenient syntax for defining curried functors. The application is similar to currying, though. module Mine = Make (Keytype) (Pritype) 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