Advertisement
Guest User

Untitled

a guest
Jul 6th, 2017
133
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Rust 0.21 KB | None | 0 0
  1. use std::rc::Rc;
  2.  
  3. enum List {
  4.     Pair(Rc<List>, Rc<List>),
  5.     Nothing,
  6. }
  7.  
  8. fn main() {
  9.     let mut x = Rc::new(List::Nothing);
  10.     for _ in 0..80000 {
  11.         x = Rc::new(List::Pair(Rc::new(List::Nothing), x.clone()));
  12.     }
  13. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement