|Anonymous | Login | Signup for a new account||2017-06-24 09:05 CEST|
|Main | My View | View Issues | Change Log | Roadmap|
|View Issue Details|
|ID||Project||Category||View Status||Date Submitted||Last Update|
|0007283||OCaml||standard library||public||2016-07-05 12:21||2017-05-27 02:26|
|Target Version||Fixed in Version|
|Summary||0007283: List Module Inconsistancy :: "map"+"mapi" "iter"+"iteri" "rev_map"... but no "rev_mapi"|
|Description||In module List there is "map"+"mapi" "iter"+"iteri" |
"rev_map"... but no "rev_mapi" :(
Any particular reason ?
IMHO this seems like a inconsistency.
There should be either have map + mapi AND rev_map + rev_mapi OR map + rev_map.
I opt for the former (and pledge to add rev_mapi) :)
|Tags||No tags attached.|
|FWIW, other iterators are missing the "i" variant as well: fold_left, fold_right, iter2, map2, fold_left2, fold_right2, rev_map2, but also for_all, exists, for_all2, exists2, find, filter, find_all, partition.|
edited on: 2016-07-05 22:39
`rev_map` is just an optimisation of `rev o map`, so I see it as a pragmatic addition driven by need more than consistency. If we mark out optimisations, then we can worry about consistency for the remainder of the interface.
That said, folds don't need indexed variants, since one can just pass a counter in the accumulator. If we could also argue that indices are less useful in predicates (my guess), then we would be left with `rev_mapi` and `rev_map2i` as candidates for inclusion.
|2016-07-05 12:21||tormen||New Issue|
|2016-07-05 12:53||frisch||Note Added: 0016036|
|2016-07-05 22:38||paurkedal||Note Added: 0016037|
|2016-07-05 22:39||paurkedal||Note Edited: 0016037||View Revisions|
|2017-02-23 16:43||doligez||Category||OCaml standard library => standard library|
|2017-04-14 16:39||doligez||Status||new => acknowledged|
|Copyright © 2000 - 2011 MantisBT Group|