Jump to content

Parametric polymorphism: Difference between revisions

(added D code)
Line 8:
 
=={{header|Ada}}==
<ada>
generic
type Element_Type is private;
Line 22 ⟶ 23:
end record;
end Container;
</ada>
 
<ada>
package body Container is
procedure Replace_All(The_Tree : in out Tree; New_Value : Element_Type) is
Line 35 ⟶ 37:
end Replace_All;
end Container;
</ada>
 
=={{header|C++}}==
Anonymous user
Cookies help us deliver our services. By using our services, you agree to our use of cookies.