Enforced immutability: Difference between revisions
m
→{{header|Raku}}: Fix comments: Perl 6 --> Raku
Thundergnat (talk | contribs) (Rename Perl 6 -> Raku, alphabetize, minor clean-up) |
SqrtNegInf (talk | contribs) m (→{{header|Raku}}: Fix comments: Perl 6 --> Raku) |
||
Line 891:
=={{header|Raku}}==
(formerly Perl 6)
You can create constants in
<lang perl6>constant $pi = 3.14159;
constant $msg = "Hello World";
Line 918:
}</lang>
A number of built-in types are considered immutable value types, including:
<pre>Str
Int
Num
Rat
FatRat
Complex
Bool
Exception
Block Executable objects that have lexical scopes
Seq A list of values (can be generated lazily)
|