|
|
| There's more than one way to do things | |
| PerlMonks |
Re: PERLISP meditationsby LanX (Monsignor) |
| on Sep 29, 2012 at 14:24 UTC ( #996383=note: print w/ replies, xml ) | Need Help?? |
|
Thats what you want?
I skipped the &next sub for integer stepping, but shouldn't be to difficult with a while loop checking $a<$b. (UPDATE: I'm puzzled... if "&next" is necessary to get the next element of an iterator one must also provide a &cmp for checking $a<$b in the loop-condition) Better avoid Lisp-recursion in Perl, when you can use "real" loops, we don't automatically optimize them to loops like Lisp does.
Cheers Rolf
In Section
Meditations
|
|
||||||||||||||||||||||||||