in reply to Re^4: Overcoming addiction to Lisp
in thread Overcoming addiction to Lisp
...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 }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^6: Overcoming addiction to Lisp
by Anonymous Monk on Jun 16, 2005 at 20:26 UTC | |
by runrig (Abbot) on Jun 16, 2005 at 20:40 UTC | |
by Anonymous Monk on Jun 16, 2005 at 20:53 UTC | |
by Anonymous Monk on Jul 19, 2005 at 16:46 UTC |