From: "Coscoy, Yann" <yann.coscoy@icdc.caissedesdepots.fr>
To: "'caml-list@inria.fr'" <caml-list@inria.fr>
Subject: Stream standard library
Date: Mon, 21 Feb 2000 12:21:58 +0100 [thread overview]
Message-ID: <40C4228EC468D211B04800A0C9DF1D6636DDD7@TSEXCHANGE> (raw)
I have the impression that it would be useful to have some other
constructors in standard module Stream. I feel quite limited with "from :
('int -> 'a option) -> 'a t".
I suggest to had the functions:
val map_list : ('a -> 'b list) -> 'a t -> 'b t
val from_list : (int -> 'a list option) -> 'a t
Other possibilities are:
val mapi_list : (int -> 'a -> 'b list) -> 'a t -> 'b t
(with stream counter)
val map : ('a -> 'b) -> 'a t -> 'b t
val mapi : (int -> 'a -> 'b) -> 'a t -> 'b t
(these functions are to restricted in my opinion)
val from_list : (int -> 'a list) -> 'a t
(an empty list specifies end of stream)
It would be interesting if other ocaml users give their opinion on the
topics. Are these functions suitable in a standard library? What would
be the best function names and function types?
Best regards,
Yann Coscoy
---------------------------------------------------------------------
Yann Coscoy
Informatique CDC - Direction des Techniques Avancées
4, rue Berthollet
94110 Arcueil
Tél. : 01 40 49 15 28
Fax. : 01 40 49 15 78
e-mail : Yann.Coscoy@icdc.caissedesdepots.fr
reply other threads:[~2000-02-21 17:16 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=40C4228EC468D211B04800A0C9DF1D6636DDD7@TSEXCHANGE \
--to=yann.coscoy@icdc.caissedesdepots.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;
as well as URLs for NNTP newsgroup(s).