...it really sounds like you should be using the builtin list traversal operators...
The code is not traversing a list. It is creating an iterator, and executing a block of code for each item returned by the iterator. You might argue that a foreach{...} is an iterator, but that would require generating the entire list first, which may not be appropriate here. In perl it would be more like:
my $nxt_str = make_strings($n); while (my $str = $nxt_str->()) { #..do stuff with $str }
In reply to Re^5: Overcoming addiction to Lisp
by runrig
in thread Overcoming addiction to Lisp
by spurperl
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |