in reply to Re^3: reduce like iterators
in thread reduce like iterators
> Would that do what you want?
Thanks Elisheva, but I don't have an implementation problem.
I'm well aware that there are plenty of possibilities to realize a specialized function, e.g. with a prototyped code-block like you demonstrated.
I'm rather interested in a good design, to produce elegant, expressive and easily maintainable code.
As I said, I wouldn't like to reimplement each function in List::Util and List::MoreUtils as "reduce like" versions, with the additional problem to find and memorize new names for those functions.
Thats why I'm meditating about additional special vars to augment those functions with the needed tweaks in a orthogonal way, without breaking the original functionality.
As an analogue, see how many RegEx-functions other languages like PHP have to implement special functionalities, which are realized in Perl with special vars or modifiers.
Cheers Rolf
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^5: reduce like iterators
by ELISHEVA (Prior) on Jan 03, 2011 at 23:08 UTC | |
by LanX (Saint) on Jan 04, 2011 at 19:49 UTC |