DEV Community

loading...

Discussion on: Implementing Linked List in Rust

Collapse
vit1251 profile image
Vitold S

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

Collapse
felixfaisal profile image
felixfaisal Author

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.