in reply to Re^2: An iterator for (not "iterating") a recursive data structure.
in thread An iterator for (not "iterating") a recursive data structure.

If I were to have implemented this in code, I would have probably wrapped this into something like Iterator::Simple, which wraps the 'iteratee' into an object, and adds syntactic sugar that sets it up to be accessed with ->next(), <$it>, and other sugar and coercions that help to gloss over some of the details. I believe that the object created by the module would fit the definition of the iterator. I do agree that the function I provided should have probably been referred to in my test code as $cb or some such.

--MidLifeXis

Replies are listed 'Best First'.
Re^4: An iterator for (not "iterating") a recursive data structure.
by LanX (Saint) on Feb 13, 2015 at 14:43 UTC
    > should have probably been referred to in my test code as $cb

    I wasn't criticizing you, the whole thread is fuzzy. :)

    edit

    Thx for pointing me to Iterator::Simple :)

    Cheers Rolf

    PS: Je suis Charlie!

      No personal criticism taken. I usually try to be clear in my examples, as in our field, precision in terminology is important. Your critique was, from a technical perspective, spot on. :-)

      --MidLifeXis