-
Notifications
You must be signed in to change notification settings - Fork 106
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 parity of DynArray and Array #872
Feature parity of DynArray and Array #872
Conversation
…DynArray.(filter and filter_map). Added "update" function to DynArray.
Can you break this into smaller PRs? |
Also, I don't know this module so it doesn't help. |
Maybe @murmour could help review this. |
I am too lazy to do a large chunk of code review now (pretty much all the time, to be honest). |
I only read the diff commit, didn't test it, but it look like a good proposal. Only Anyway a lot of tests are provided, for most functions. |
There are calls to |
Should we add preprocessing elements for |
Thanks for the review. |
@fccm you could ask to be a member of the batteries team on github. |
Idealy, an @SInCE tag must be added with NEXT_RELEASE for all the new functions in the interface. |
The ChageLog should be updated, with andrep as author and fcc as reviewer. |
@fccm thanks a lot for the review. |
You don't need to replace https://gist.github.com/fccm/8b6e0f3fa856a350823fbacd334a7a77 |
New functions seem to be: singleton, first, left, right, head, tail, fill, split, combine, filteri, partition, for_all, exists, mem, memq, index_of, find, findi, index_of, modify, modifyi, fold_lefti, fold_righti, reduce, rev, rev_in_place, max, min, min_max, avg, favg, iter2, iter2i, for_all2, exists2, map2, map2i, cartesian_product, range, Exceptionless.find, Exceptionless.findi, unsafe_upd, upd Updated functions: filter, |
'Stdlib.' will not compile on older ocaml versions. |
related to #984 |
Then |
fixed in master |
a PR to update the interface file would be appreciated |
This is something I can do. |
I just quickly tested sum and fsum, I don't see any problem. Which problem did you found? |
the submitted version would have crashed on an empty data structure |
This patch adds multiple functions in DynArray that are present in Array but not in the former. As of this patch, the only functions which exist in Array but not in DynArray are
backwards
andof_backwards
which I'm not comfortable handling (maybe someone else can help).
Also,
filter
was reimplemented in a more efficient way.Finally, I added a function
upd
(short for "update") for the common idioma.(i) <- f a.(i)
which should be faster (no duplicate bounds checking) and more convenient; for example instead of
set a i (incr @@ get a i)
one can write
upd a i incr
.Let me know what you think.