in reply to Re^3: Efficient but elegant Cross-Product iterator ?
in thread Efficient but elegant Cross-Product iterator ?

NestedLoops allows to pass code-refs, i.e. they will be dynamically (re-)evaluated each time one loop-level is (re-)entered.

Cheers Rolf
(addicted to the Perl Programming Language :)
Wikisyntax for the Monastery

  • Comment on Re^4: Efficient but elegant Cross-Product iterator ?

Replies are listed 'Best First'.
Re^5: Efficient but elegant Cross-Product iterator ?
by ikegami (Patriarch) on Jun 20, 2020 at 22:05 UTC

    Ah, so it will create the arrays for you, cool. (Added the alternate solution to my earlier post.)

      It's also semantically different!

      The subs don't need to return a constant list, so each loop might restart with a new dynamic list.

      Cheers Rolf
      (addicted to the Perl Programming Language :)
      Wikisyntax for the Monastery