From: Miguel Ambrona <miguel.ambrona@imdea.org>
To: caml-list@inria.fr
Subject: [Caml-list] Function that outputs a functor
Date: Tue, 30 Apr 2019 15:10:16 +0200 [thread overview]
Message-ID: <f5de4440-983b-a51f-0093-c292b7b674fa@imdea.org> (raw)
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
next reply other threads:[~2019-04-30 13:11 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-04-30 13:10 Miguel Ambrona [this message]
2019-04-30 13:27 ` Nicolás Ojeda Bär
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=f5de4440-983b-a51f-0093-c292b7b674fa@imdea.org \
--to=miguel.ambrona@imdea.org \
--cc=caml-list@inria.fr \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).