Update Examples

Glen Whitney 2024-08-24 16:50:18 +00:00
parent 7b4b9d94f4
commit 43bcfb9a2f

@ -506,9 +506,12 @@ impl List
fn main
let mut list = List::new()
//! These calls could be chained, but they could have
//! been chained in Rust, and it's not reasonable to
//! expect Husht to detect chaining opportunities.
list = list.prepend(1)
.prepend(2)
.prepend(3)
list = list.prepend(2)
list = list.prepend(3)
println! "linked list has length: {}", list.len()
println! "{}", list.stringify()