a constructor function

This commit is contained in:
Sander Hautvast 2022-01-26 18:53:36 +01:00
parent 5ffe48f2d3
commit 5f507ceada

View file

@ -16,3 +16,9 @@ struct Node {
next: Link, next: Link,
} }
impl List{
pub fn new() -> Self {
Self { head: Link::Empty }
}
}