In data 28 mai 2009 alle ore 00:13:19, Mark J. Reed <markjr...@gmail.com> ha scritto:

You can write a sub to return the next step:

sub bondigi { state $n=1; return (<Bon Digi Bon Digi>, <Bon> xx $n,
<Digi> xx $n++); }

Nahh. That's too easy...
It's not fun :-)

but I think an idiomatic Perl 6 solution would have a proper lazy
Iterator.

Yes, that's more interesting.

--
Cosimo

Reply via email to