list on the heap
This commit is contained in:
parent
137686f79a
commit
bfdea56399
1 changed files with 6 additions and 1 deletions
|
|
@ -2,7 +2,12 @@ fn main() {
|
|||
|
||||
}
|
||||
|
||||
struct Node {
|
||||
elem: i32,
|
||||
next: List,
|
||||
}
|
||||
|
||||
pub enum List {
|
||||
Empty,
|
||||
Elem(i32, Box<List>),
|
||||
More(Box<Node>),
|
||||
}
|
||||
Loading…
Add table
Reference in a new issue