feat: completed solutions

This commit is contained in:
2026-03-23 03:36:33 -04:00
parent 2279bea6f1
commit f568c094cb
65 changed files with 424 additions and 139 deletions
+3 -3
View File
@@ -12,18 +12,18 @@
// TODO: Use a `Box` in the enum definition to make the code compile.
#[derive(PartialEq, Debug)]
enum List {
Cons(i32, List),
Cons(i32, Box<List>),
Nil,
}
// TODO: Create an empty cons list.
fn create_empty_list() -> List {
todo!()
List::Nil
}
// TODO: Create a non-empty cons list.
fn create_non_empty_list() -> List {
todo!()
List::Cons(64, Box::new(List::Nil))
}
fn main() {