Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FEATURE WISH: Map.iter order of visiting #8388

Closed
vicuna opened this issue Nov 27, 2003 · 1 comment
Closed

FEATURE WISH: Map.iter order of visiting #8388

vicuna opened this issue Nov 27, 2003 · 1 comment

Comments

@vicuna
Copy link

vicuna commented Nov 27, 2003

Original bug ID: 1947
Reporter: administrator
Status: closed
Resolution: fixed
Priority: normal
Severity: feature
Category: ~DO NOT USE (was: OCaml general)

Bug description

Full_Name: Benedikt Grundmann
Version: 3.07
OS: Linux
Submission from: dsl-213-023-227-248.arcor-ip.net (213.23.227.248)

To cite the manual of Map:
val iter : (key -> 'a -> unit) -> 'a t -> unit
iter f m applies f to all bindings in map m. f receives the key as first
argument, and the associated value as second argument. The order in which the
bindings are passed to f is unspecified.
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
The source code actually implements ordered visiting and it is indeed one of the
great advantages of using a Map instead of a Hashtbl (the other it being
sideeffect free).
So my request is:

Make the current behavior of iter a required one and update the documentation to
read
something like this:
...The bindings are passed to f in increasing order with regard to the ordering
function.

Cheers,

Bene

@vicuna
Copy link
Author

vicuna commented Feb 14, 2004

Comment author: administrator

Documentation updated 2004-02-14 by XL

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant