Guest User

Untitled

a guest
Dec 12th, 2018
79
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.25 KB | None | 0 0
  1. #[derive(Debug)]
  2. enum List {
  3. Node(i32,Box<List>),
  4. Child(Vec<Box<List>>),
  5. Nil,
  6. }
  7. use List::{Child,Node, Nil};
  8.  
  9. fn main() {
  10.  
  11. let child = Box::new(Child(vec![Box::new(Node(5,Box(Nil)))]));
  12. let aa = Node(3,child);
  13. println!("{:?}",aa);
  14. }
Add Comment
Please, Sign In to add comment