From: Jean-Baptiste Rouquier <jrouquiethearchiveshouldhaveafewantispamtricks@ens-lyon.fr>
To: caml-list <caml-list@inria.fr>
Subject: Re: [Caml-list] really HO Functions
Date: Wed, 29 Sep 2004 22:48:11 +0200 (CEST) [thread overview]
Message-ID: <1096490891.415b1f8b2ecbd@mouette.ens-lyon.fr> (raw)
Radu Grigore wrote:
>For this message I'll classify functions on "levels" based on how many
>nested parenthesis are needed to represent their type. (...)
>
>My question is: are there functions of level >= 2 used in practice
>(e.g. (('a -> 'b -> 'a) -> 'a -> 'b list -> 'a) -> 'c)?
In my soon-to-be-released library to read and write configuration files, I have
one example of this. Basically, the function reading a file (actually a method)
has on optional argument that allows the user to override the default behaviour
in case there is an error.
The argument is itself a function that get all the available information as
arguments, including a value of type (out_channel -> unit) that pretty print
(with module Format) a part of the read AST to the given output channel.
So I have
method read : ... -> ... ->
?on_type_error : (... -> ... -> (out_channel -> unit) -> ... -> unit) ->
string -> unit
Out of curiosity, may I ask why you're looking for such functions ?
Regards,
--
Jean-Baptiste Rouquier
-------------------
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 reply other threads:[~2004-09-29 20:48 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-09-29 20:48 Jean-Baptiste Rouquier [this message]
2004-10-02 5:02 ` Radu Grigore
2004-10-02 6:33 ` John Prevost
2004-10-02 16:44 ` Seth J. Fogarty
-- strict thread matches above, loose matches on Subject: below --
2004-09-30 17:30 Harrison, John R
2004-09-29 18:48 Radu Grigore
2004-09-29 19:24 ` Jacques Carette
2004-09-29 22:31 ` Jon Harrop
2004-09-29 23:32 ` Marcin 'Qrczak' Kowalczyk
2004-09-30 6:27 ` Diego Olivier Fernandez Pons
2004-09-30 19:27 ` Michal Moskal
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=1096490891.415b1f8b2ecbd@mouette.ens-lyon.fr \
--to=jrouquiethearchiveshouldhaveafewantispamtricks@ens-lyon.fr \
--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