The documentation is in your link. Create a linked list: l = nil()
. Add to the list: l = cons(l, item)
(don’t know why it’s called that, there’s probably a reason). Iterate the list: for x in l
. If you want to iterate it specifically with next
you’ll need to define next
as iterate
- like here
https://docs.julialang.org/en/v1/base/collections/#lib-collections-iteration