DEV Community

Discussion on: Implementing Linked List in Rust

vit1251 profile image
Vitold S

myList::append is recursive? Could you use while instead or it does not matter? Tail optimization?

felixfaisal profile image

Yeah, It is possible to use a while loop instead of it being recursive, I found it easier to use recursive along with match. There's a lot I haven't accounted for, It was just my first implementation that worked and I wanted to write an article on it.