>filters half of your CS classmates
Filters half of your CS classmates
Isaac Gomez
Gabriel Robinson
bump
Isaiah Cooper
How do I reverse a link list without recursion
Mason Hill
wildcards dont filter anything
Jason Myers
bump
Ian Smith
bump
Josiah Nguyen
stdout
Xavier Rogers
bump
Mason Miller
the pointer or the wildcard kind
good one
Brody Sullivan
bump
Jackson Hughes
bump
Carson Perez
test
Easton Hughes
test
Jack Kelly
test
Ethan Bennett
bump
James Adams
>filters all Any Forums posts
Joseph Watson
lol
Carter Butler
Why do people get filtered by Kleene stars?
Jacob Long
you won this thread
Nolan Gomez
In Rust, this is just:
enum LinkedList {
Cons(T, Box),
Nil
}
impl LinkedList {
fn reverse(mut self) -> Self {
let mut result = Self::Nil;
while let Self::Cons(x, xs) = self {
result = Self::Cons(x, Box::new(result));
self = *xs;
}
result
}
}
Andrew Cooper
bump