* Stream standard library
@ 2000-02-21 11:21 Coscoy, Yann
0 siblings, 0 replies; only message in thread
From: Coscoy, Yann @ 2000-02-21 11:21 UTC (permalink / raw)
To: 'caml-list@inria.fr'
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
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2000-02-21 17:16 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2000-02-21 11:21 Stream standard library Coscoy, Yann
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).