in reply to Re: Numerically generate the perl sequence 1, 11, 111, ....
in thread Generate the perl sequence 1, 11, 111, ....
Well, but the conversion costs something. So in Perl 6, if you're worried about efficiency, you'd probably write it like this:
Unless we can make the "whatever" version intuit such an algebraic relationship, in which case it would just be:1,11,111,1111 ... { $^prev * 10 + 1 }
Just how far we could/should drive the intuition of the series operator is an interesting question.1,11,111,111 ... *
|
---|
In Section
Seekers of Perl Wisdom