![]() |
|
Perl: the Markov chain saw | |
PerlMonks |
Re: Re: Perl Functionality in Javaby djantzen (Priest) |
on Nov 08, 2002 at 14:20 UTC ( #211434=note: print w/replies, xml ) | Need Help?? |
Okay, I've got a major improvement on this. Rather than forcing the user to handle iteration through the loop and to compile the return list -- making this implementation of highly dubious value over a normal 'for' loop -- we define an abstract superclass from which to inherit rather an interface to implement:
The original definition of map remains the same. Then below, we can simplify the anonymous class to the point where this is really starting to look like map!
It's times like these I say booyah! ; )
In Section
Seekers of Perl Wisdom
|
|