in reply to Re^3: loop over n-dimensional lattice
in thread loop over n-dimensional lattice

No. A::L::NestLoops provides an iterator; List::Comprehensions takes a callback.

While NestedLoops does provide an iterator, it also accepts a callback.

my $iter = NestedLoops(\@loops);
or
NestedLoops(\@loops, \&callback);

Replies are listed 'Best First'.
Re^5: loop over n-dimensional lattice
by BrowserUk (Patriarch) on Aug 06, 2008 at 01:15 UTC

    So it does, it's been a long time since I looked. It's just at the wrong end of the argument list :)

    That's part of the (my) problem with NestedLoops. The complexity of the interface.


    Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
    "Science is about questioning the status quo. Questioning authority".
    In the absence of evidence, opinion is indistinguishable from prejudice.