Verse Library verse

11 If There Is A Nextnode For The Iterator To Travel

Declares an iterator class structure for linked lists, demonstrating scope initialization limitations.

extracted-snippets/documentation/en-us/fortnite/linked-lists-in-verse/11-if-there-is-a-nextnode-for-the-iterator-to-travel-.verse

# Source URL: https://dev.epicgames.com/documentation/en-us/fortnite/linked-lists-in-verse
# Local doc:  epic-docs/documentation/en-us/fortnite/linked-lists-in-verse.md
# Section:    If there is a NextNode for the iterator to travel to, travel to that node
linked_list_iterator := class:
List:linked_list
# The below line will fail because you can't access List from this scope
var CurrentNode:list_node := list_node{Next := option{List.Head}}

Comments

    Sign in to vote, comment, or suggest an edit. Sign in