diff --git a/src/exercises/linked.md b/src/exercises/linked.md index d6896b2..59e45b5 100644 --- a/src/exercises/linked.md +++ b/src/exercises/linked.md @@ -15,12 +15,20 @@ struct Linked<'a, F> { } impl<'a, F: FnMut(String)> Linked<'a, F> { -# /* +# fn __() { +# mod __ { +# struct Node<'a> { next: Option>, value: &'a str } +# struct Linked<'a, F> { node: Box>, callback: &'a mut F } +# impl Linked<'_, F> { fn with(&mut self, value: &str) -> Linked<'_, F> { +# unimplemented!() } fn with2(self) { let _ = Self { node: Node { next: Some(self.node), -# */ +# value: unimplemented!(), +# }.into(), +# callback: self.callback, +# }; } } } } # fn with<'b>(&'b mut self, value: &'b str) -> Linked<'b, F> { # Linked { # node: Node {