<?xml version="1.0" encoding="ISO-8859-1"?>

<!DOCTYPE message PUBLIC
  "-//MLarc//DTD MLarc output files//EN"
  "../../mlarc.dtd"[
  <!ATTLIST message
    listname CDATA #REQUIRED
    title CDATA #REQUIRED
  >
]>

  <?xml-stylesheet href="../../mlarc.xsl" type="text/xsl"?>


<message 
  url="2003/12/53b83ba0ff1d690a7381fbc01e1cca57"
  from="David Brown &lt;caml-list@d...&gt;"
  author="David Brown"
  date="2003-12-22T23:59:02"
  subject="Re: [Caml-list] Multiparameter functors?"
  prev="2003/12/d2fab26d184127e6f93292a00502213c"
  next="2003/12/51b7c5d779dd26ab371ec36d45196ada"
  prev-in-thread="2003/12/d2fab26d184127e6f93292a00502213c"
  next-in-thread="2003/12/5ca36c819dc9228f96fab03197c64733"
  prev-thread="2003/12/558c3ea8590ceaa0759c13dbe9214a62"
  next-thread="2003/12/2a656034d7dd922a09976441973503de"
  root="../../"
  period="month"
  listname="caml-list"
  title="Archives of the Caml mailing list">

<thread subject="[Caml-list] Multiparameter functors?">
<msg 
  url="2003/12/11aef5a42199a1b25c1d3da01c1e7795"
  from="Brian Hurt &lt;bhurt@s...&gt;"
  author="Brian Hurt"
  date="2003-12-22T03:12:53"
  subject="[Caml-list] Multiparameter functors?">
<msg 
  url="2003/12/a9e3f6e03bb89f6e730fd5401e17d50f"
  from="Julien Signoles &lt;Julien.Signoles@l...&gt;"
  author="Julien Signoles"
  date="2003-12-22T10:21:02"
  subject="Re: [Caml-list] Multiparameter functors?">
<msg 
  url="2003/12/51b7c5d779dd26ab371ec36d45196ada"
  from="Brian Hurt &lt;bhurt@s...&gt;"
  author="Brian Hurt"
  date="2003-12-23T01:12:30"
  subject="Re: [Caml-list] Multiparameter functors?">
</msg>
</msg>
<msg 
  url="2003/12/b7717c6417bff34e7f3d535b9a41f26b"
  from="Matt Gushee &lt;mgushee@h...&gt;"
  author="Matt Gushee"
  date="2003-12-22T23:04:20"
  subject="Re: [Caml-list] Multiparameter functors?">
<msg 
  url="2003/12/d2fab26d184127e6f93292a00502213c"
  from="David Brown &lt;caml-list@d...&gt;"
  author="David Brown"
  date="2003-12-22T23:56:17"
  subject="Re: [Caml-list] Multiparameter functors?">
</msg>
<msg 
  url="2003/12/53b83ba0ff1d690a7381fbc01e1cca57"
  from="David Brown &lt;caml-list@d...&gt;"
  author="David Brown"
  date="2003-12-22T23:59:02"
  subject="Re: [Caml-list] Multiparameter functors?">
</msg>
</msg>
<msg 
  url="2003/12/5ca36c819dc9228f96fab03197c64733"
  from="Julien Demouth &lt;julien.demouth@f...&gt;"
  author="Julien Demouth"
  date="2003-12-22T23:44:50"
  subject="Re: [Caml-list] Multiparameter functors?">
</msg>
</msg>
</thread>

<contents>
&gt; On Mon, Dec 22, 2003 at 04:04:15PM -0700, Matt Gushee wrote:
&gt;
&gt; &gt; Is there anything obvious about functors? ;-)
&gt; &gt; 
&gt; &gt; I've found the following syntax to work:
&gt; &gt; 
&gt; &gt;   module Make =
&gt; &gt;     functor (Key:Map.OrderedType) -&gt; functor (Pri:Map.OrderedType) -&gt;
&gt; &gt;       struct
&gt; &gt;         ....
&gt; &gt;       end;;
&gt; 
&gt; This is very similar to currying of functions, except that Ocaml doesn't
&gt; give you nice convenient syntax for defining curried functors.  The
&gt; application is similar to currying, though.
&gt; 
&gt;   module Mine = Make (Keytype) (Pritype)

And, I'm not even right.  Module definitions can also be curried:

  module Make (Key : Map.OrderedType) (Pri : Map.OrderedType) =
    struct
      ...
    end

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

</contents>

</message>

