Update Ch15

This commit is contained in:
Peng Hailin, 2023-05-12 19:09:48 +08:00
parent 37b9f6422c
commit eb8d4b7b20

View File

@ -11,10 +11,12 @@ use std::rc::Rc;
fn main() {
let value = Rc::new(RefCell::new(5));
let a = Rc::new(Cons(
let a = Rc::new(
Cons(
Rc::clone(&value),
Rc::new(Nil)
));
)
);
let b = Cons(
Rc::new(RefCell::new(3)),