LinkedListNode<T>

LinkedList’s elements are LinkedListNode objects, which are simple boxes/wrappers around whatever type T you’re storing in the list. A LinkedListNode has an item property for retrieving the wrapped value, as well as previous and next pointers for traversing the list.

Accessing elements

LinkedList defines a subscript getter as well as func at(index:Index) -> LinkedListNode<T> for accessing elements at particular indices. The subscript operator will fail when passed an out-of-bounds index, while at() will simply return nil.

let someNode = list[2]
let someNode = list.at(2)

Traversing the list

LinkedList implements SequenceType, allowing you to use for...in loops, among many other things.