caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
* [Caml-list] Function that outputs a functor
@ 2019-04-30 13:10 Miguel Ambrona
  2019-04-30 13:27 ` Nicolás Ojeda Bär
  0 siblings, 1 reply; 2+ messages in thread
From: Miguel Ambrona @ 2019-04-30 13:10 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, other threads:[~2019-04-30 13:28 UTC | newest]

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).