From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (from majordomo@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id AAA15132; Tue, 23 Dec 2003 00:56:17 +0100 (MET) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id AAA15166 for ; Tue, 23 Dec 2003 00:56:16 +0100 (MET) Received: from mail.davidb.org (adsl-64-172-240-129.dsl.sndg02.pacbell.net [64.172.240.129]) by concorde.inria.fr (8.11.1/8.11.1) with ESMTP id hBMNuEb25268 for ; Tue, 23 Dec 2003 00:56:15 +0100 (MET) Received: from davidb by mail.davidb.org with local (Exim 3.36 #1 (Debian)) id 1AYZuF-0001Da-00 for ; Mon, 22 Dec 2003 15:56:11 -0800 Date: Mon, 22 Dec 2003 15:56:11 -0800 From: David Brown To: Ocaml Mailing List Subject: Re: [Caml-list] Multiparameter functors? Message-ID: <20031222235611.GA4603@davidb.org> References: <20031222230415.GA1145@swordfish> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20031222230415.GA1145@swordfish> User-Agent: Mutt/1.5.4i X-Loop: caml-list@inria.fr X-Spam: no; 0.00; caml-list:01 caml-list:01 functors:01 gushee:01 functors:01 functor:01 orderedtype:01 functor:01 orderedtype:01 struct:01 currying:01 curried:01 currying:01 ocaml:01 0700,:01 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk 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