List

List

new List()

Creates an empty List
Source:

Methods

map(iteratee)

Calls iteratee on each Node of the List. Alters the Node.
Source:
Parameters:
Name Type Description
iteratee Iteratee

pop() → {Node}

Pops a Node from the List
Source:
Returns:
Type:
Node
the popped element

push(node)

Pushes a Node to the List
Source:
Parameters:
Name Type Description
node Node

remove(node)

removes a Node from the List
Source:
Parameters:
Name Type Description
node Node

swap(left, right)

Implements a soft swap of two elements. Actual objects are the same just their 'data' property is swapped.
Source:
Parameters:
Name Type Description
left Node
right Node

toString() → {String}

Returns all list nodes' data concatenated into a single string
Source:
Returns:
Type:
String