Geometric series
say ~(1, 2, 4 ... 1000) # 1 2 4 8 16 32 64 128 256 512
- - - -
say ~(2, 6, 18 ... 1000) # 2 6 18 54 162 486
- - - -
say ~(1, .1, .01 ... .0000001)continued...
Perl 6 | Perl 6 series operator | #9 |
say ~(1, 2, 4 ... 1000) # 1 2 4 8 16 32 64 128 256 512
- - - -
say ~(2, 6, 18 ... 1000) # 2 6 18 54 162 486
- - - -
say ~(1, .1, .01 ... .0000001)continued...
Copyright © 2010 http://www.pmichaud.com/2010/pres/ |