Polymorphic copy: Difference between revisions
Content added Content deleted
Thundergnat (talk | contribs) (Rename Perl 6 -> Raku, alphabetize, minor clean-up) |
SqrtNegInf (talk | contribs) m (→{{header|Raku}}: .perl -> .raku) |
||
Line 1,875: | Line 1,875: | ||
=={{header|Raku}}== |
=={{header|Raku}}== |
||
(formerly Perl 6) |
(formerly Perl 6) |
||
{{works with|Rakudo|2020.08.1}} |
|||
<lang perl6>my Cool $x = 22/7 but role Fink { method brag { say "I'm a cool {self.WHAT. |
<lang perl6>my Cool $x = 22/7 but role Fink { method brag { say "I'm a cool {self.WHAT.raku}!" }} |
||
my Cool $y = $x.clone; |
my Cool $y = $x.clone; |
||
$y.brag;</lang> |
$y.brag;</lang> |
||
{{out}} |
{{out}} |
||
<pre>I'm a cool Rat+Fink!</pre> |
<pre>I'm a cool Rat+{Fink}!</pre> |
||
=={{header|REXX}}== |
=={{header|REXX}}== |