Skip to content

Commit

Permalink
complex example for constant
Browse files Browse the repository at this point in the history
  • Loading branch information
gfldex committed Jan 16, 2017
1 parent 2640d9e commit 5a0a902
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions doc/Language/terms.pod6
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,9 @@ Constants are declared with C<constant> and do not require a sigil. The RHS is e
constant SpeedOfLight = 299792458 # m/s
constant PHI = 1.61803398875 # The golden ratio is everywhere!
constant POW2 = do { my int @table; @table = 1, 2, 4 ... 2**32; @table };
say POW2[16];
# OUTPUT«65536␤»
=end pod

0 comments on commit 5a0a902

Please sign in to comment.