caml-list - the Caml user's mailing list
 help / Atom feed
* [Caml-list] Function that outputs a functor
@ 2019-04-30 13:11 Miguel Ambrona
  2019-04-30 13:28 ` Nicolás Ojeda Bär
  0 siblings, 1 reply; 2+ messages in thread
From: Miguel Ambrona @ 2019-04-30 13:11 UTC (permalink / raw)
  To: caml-list

Dear caml-hackers,

Is there a way of writing a function that returns a functor?

For example, the following function takes an integer and returns a module:

``let make (n : int) = (module struct blablabla end : MyModule)''

Can I do the same with a functor as output instead of a module? Of
course, the implementation may use the integer "n".

Thanks a lot!

Best,

Miguel




^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, back to index

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-04-30 13:11 [Caml-list] Function that outputs a functor Miguel Ambrona
2019-04-30 13:28 ` Nicolás Ojeda Bär

caml-list - the Caml user's mailing list

Archives are clonable: git clone --mirror https://inbox.ocaml.org/caml-list

AGPL code for this site: git clone https://public-inbox.org/ public-inbox