Arithmetic series
say ~(2, 4, 6, ... 100) # 2 4 6 8 10 ... 100
- - - -
say ~(5, 10, 15 ... 100) # 5 10 15 20 25 ... 100
- - - -
say ~(10, 9, 8 ... 0); # 10 9 8 7 6 5 4 3 2 1 0continued...
Perl 6 | Perl 6 series operator | #8 |
say ~(2, 4, 6, ... 100) # 2 4 6 8 10 ... 100
- - - -
say ~(5, 10, 15 ... 100) # 5 10 15 20 25 ... 100
- - - -
say ~(10, 9, 8 ... 0); # 10 9 8 7 6 5 4 3 2 1 0continued...
Copyright © 2010 http://www.pmichaud.com/2010/pres/ |