Data update
This commit is contained in:
parent
72eb4943cb
commit
4d5544505c
2347 changed files with 62432 additions and 16731 deletions
|
|
@ -1,4 +1,4 @@
|
|||
[[wp:Parametric Polymorphism|Parametric Polymorphism]] is a way to define types or functions that are generic over other types. The genericity can be expressed by using ''type variables'' for the parameter type, and by a mechanism to explicitly or implicitly replace the type variables with concrete types when necessary.
|
||||
[[wp:Parametric polymorphism|Parametric polymorphism]] is a way to define types or functions that are generic over other types. The genericity can be expressed by using ''type variables'' for the parameter type, and by a mechanism to explicitly or implicitly replace the type variables with concrete types when necessary.
|
||||
|
||||
|
||||
;Task:
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
module tree(<Type>);
|
||||
module tree {Type};
|
||||
|
||||
struct Tree
|
||||
{
|
||||
|
|
|
|||
|
|
@ -2,6 +2,6 @@ import tree;
|
|||
|
||||
fn void test()
|
||||
{
|
||||
Tree(<int>) inttree;
|
||||
Tree {int} inttree;
|
||||
inttree.replace_all(3);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue