Parametric polymorphism: Difference between revisions
→{{header|Perl 6}}: marked incorrect
(Add Racket entry) |
(→{{header|Perl 6}}: marked incorrect) |
||
Line 472:
| Node (x,l,r) -> Node (f x, map_tree f l, map_tree f r)</lang>
=={{header|Perl 6}}==
{{incorrect|Does not work with latest rakudo (rakudo e9e99b)}}
<lang perl6>role BinaryTree[::T] {
has T $!value;
Line 492 ⟶ 493:
$it.replace-all(42);
say $it.perl;</lang>
=={{header|PicoLisp}}==
|