Jump to content

Polymorphic copy: Difference between revisions

(Converted both D entries from D1+Tango => D2+Phobos (I can't test Tango code))
Line 1,057:
print "\$x is: ";
$x->manifest;</lang>
=={{header|Perl 6}}==
<lang perl6>my Cool $x = 22/7 but role Fink { method brag { say "I'm a cool {self.WHAT.perl}!" }}
my Cool $y = $x.clone;
$y.brag;</lang>
{{out}}
<pre>I'm a cool Rat+Fink!</pre>
 
=={{header|PHP}}==
Anonymous user
Cookies help us deliver our services. By using our services, you agree to our use of cookies.