in reply to Re^7: Getting for() to accept a tied array in one statement
in thread Getting for() to accept a tied array in one statement
Yes, the goal is not finding out the best way to do a progress-bar API (I think doing the Progress::Any-style progress bar is still okay), but how to emulate the style of a Python library.
As a bonus, one doesn't need to know the length of the list in advance with an iterator!
With for(@tied_array) we also doesn't need to calculate the length of the list in advance. We can just retrieve an item one by one, and for() will still invoke FETCHSIZE on each iteration. Which incurs an extra cost, admittedly.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^9: Getting for() to accept a tied array in one statement
by ikegami (Patriarch) on Apr 22, 2019 at 21:56 UTC | |
by perlancar (Hermit) on Apr 23, 2019 at 04:38 UTC | |
by ikegami (Patriarch) on Apr 24, 2019 at 15:13 UTC | |
by perlancar (Hermit) on Apr 25, 2019 at 05:37 UTC | |
by ikegami (Patriarch) on Apr 25, 2019 at 17:24 UTC | |
by perlancar (Hermit) on Apr 26, 2019 at 03:00 UTC | |
by ikegami (Patriarch) on Apr 28, 2019 at 19:13 UTC |