From: Quetzalcoatl Bradley <qbradley@blackfen.com>
To: <caml-list@inria.fr>
Subject: [Caml-list] function polymorphic in number of arguments?
Date: Sun, 15 Sep 2002 20:44:19 -0700 [thread overview]
Message-ID: <94F2CE6A-C926-11D6-828F-0030657680C6@blackfen.com> (raw)
In-Reply-To: <Pine.LNX.4.33.0209152206510.29061-100000@lcavpc19.epfl.ch>
Is it possible to make a function of N arguments (3 or more), the first
two are functions of N-2 arguments, and the function calls the first
two functions passing its remaining arguments to each of the first two
functions. For example
let f1 x = print_string (x ^ "1\n");;
let f2 x = print_string (x ^ "2\n");;
let f a b x = ??? What goes here ???
f f1 f2 "abc";;
result in
abc1
abc2
The trick part is I want the same function f to work if I pass it f1
and f2 of 2 arguments and pass 4 arguments to f, f1, f2, and two others
that get passed to f1 and f2.
Thanks for your time,
Quetzalcoatl Bradley
qbradley@blackfen.com
-------------------
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
next prev parent reply other threads:[~2002-09-16 10:19 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-09-15 20:15 [Caml-list] mutually referencing compilation units Henri Dubois-Ferriere
2002-09-16 3:44 ` Quetzalcoatl Bradley [this message]
2002-09-16 12:19 ` [Caml-list] function polymorphic in number of arguments? Francois Thomasset
2002-09-16 12:24 ` Francois Thomasset
2002-09-17 12:32 ` [Caml-list] mutually referencing compilation units Xavier Leroy
2002-09-19 3:09 ` John Max Skaller
2002-09-19 5:09 ` [Caml-list] ocamlmktop linking on Darwin Lex Stein
[not found] <20020917084045.46976.qmail@web11206.mail.yahoo.com>
2002-09-17 15:23 ` [Caml-list] function polymorphic in number of arguments? Quetzalcoatl Bradley
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=94F2CE6A-C926-11D6-828F-0030657680C6@blackfen.com \
--to=qbradley@blackfen.com \
--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