in reply to Re^5: Using lazy list with a for loop
in thread Using lazy list with a for loop
That has all the problems of the each builtin.
Better to have a generator creator and user.
my $iter = $api->get_widgets_iter(); while ( my ( $widget ) = $iter->() ) { ... }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^7: Using lazy list with a for loop
by LanX (Saint) on Jan 03, 2023 at 15:24 UTC | |
by ikegami (Patriarch) on Jan 03, 2023 at 16:26 UTC |