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) # 1 0.1 0.01 0.001 0.0001 1e-05 1e-06continued...
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) # 1 0.1 0.01 0.001 0.0001 1e-05 1e-06continued...
Copyright © 2010 http://www.pmichaud.com/2010/pres/ |