For over a week now I am preparing the next List::MoreUtils
release. It takes so long because I am incorporating all stuff from List::MoreUtil
into it. For each new function I had to write an equivalent XSUB and some of the turned out to be a bit tricky.
Then I noticed that List::MoreUtil
's tests (that I simply took over) are incomplete in that they don't test some of the key characteristis of each function. Some map-like functions pass aliases to the original values to their code argument. Others don't. As it happened, I also noticed that the pure-Perl implementation and the XSUB one sometimes differed with respect to this so I had to make that consistent, too.
The only thing left is now copying the documentation for these functions over from List::MoreUtil
. Most probably I will be deeply unhappy with it so I might end up rewriting it.
Re:how about adding...
ethan on 2004-11-28T20:12:42
avg
is already getting dangerously close to statistical functionality. Not that this would be fundemantally wrong in a list-module, but then people might come and ask for functions to calculate the quadratic mean or geometric mean as well.
As foruniq
anduniq_ordered
, the first is no more computational work than the second from an XS point of view (as there are no hash-slices in C so one needs to loop anyway).uniq
I could add.
I am not convinced thatstats
is so terribly useful.max
andmin
are already inList::Util
andtot
is reallyList::Util::sum
.
See http://www.perlmonks.org/?node_id=407834 for background.
I'd have to think about the idea of function generators as exemplified in the above. That way they can be used in an incremental fashion...but it also makes them more complex (a lot more complex in XS).