From: "Frédéric Gava" <frederic.gava@wanadoo.fr>
To: <caml-list@inria.fr>
Subject: Missing a function
Date: Sat, 4 Dec 2004 12:05:03 +0100 [thread overview]
Message-ID: <001501c4d9f1$1b1c4600$0100a8c0@mshome.net> (raw)
In-Reply-To: <1102062166.666.25.camel@localhost>
Hi,
I have done a comparaison on three data structures of the stdlib of OCaml (I
do parallel implementation of this data structure) and I find that the
module Map does not contain any function for counting the number of elements
of the data structure:
Set, cardinal: t -> int
Hashtbl, lenght : ('a,'b) t -> int
Map, you have to do "let length the_map = fold (fun _ _ i -> i+1)
the_map 0 "
And Set and Hastbl have also fold...
Is there an explanation (or is it just a missing ;-) ) ?
Cheers,
Frédéric Gava
next prev parent reply other threads:[~2004-12-04 11:03 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-11-30 20:30 Strange observation on polymorphic '<' Ritesh Kumar
2004-12-01 23:17 ` [Caml-list] " Damien Doligez
2004-12-03 7:24 ` Ritesh Kumar
2004-12-03 8:22 ` Ville-Pertti Keinonen
2004-12-04 11:05 ` Frédéric Gava [this message]
2004-12-04 13:25 ` [Caml-list] Missing a function sejourne_kevin
2004-12-04 14:13 ` Frédéric Gava
2005-01-29 19:34 ` Radu Grigore
2005-01-29 19:55 ` Radu Grigore
2005-01-29 21:05 ` Olivier Andrieu
2005-02-04 20:18 ` Radu Grigore
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='001501c4d9f1$1b1c4600$0100a8c0@mshome.net' \
--to=frederic.gava@wanadoo.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