Home Manual Reference Source

References

summary
public

F Node(value: any, prev: Node | null, next: Node | null)

Base node class.

private

F _concat(z: Node, y: Node)

Concatenate two input lists.

private

F _erase(x: Node, y: Node)

Erase range [x, y) from list.

private

F _extend(z: Node, iterable: Iterable): Node

Extend a list with an iterable.

private

F _insertAfter(x: Node, value: any): *

_insertAfter.

private

F _insertBefore(x: Node, value: any): *

_insertBefore.

private

F _insertBetween(x: Node, y: Node, value: any): *

_insertBetween.

private

F * _iter(first: Node): IterableIterator<Node>

Generator of nodes in list in order.

private

F * _iter_fast(first: Node): IterableIterator<Node>

Generator of nodes in list in order.

private

F _last(first: Node): Node

Returns the last node of a list.

private

F _len(x: Node): number

Compute the length of a non-empty list.

private

F _pop(x: Node): Node

Removes last Node from a non-empty list.

private

F _push(z: Node, value: any): Node

Push value to list.

private

F _remove(x: Node)

Removes input Node from its list.

private

F _rotate_left(x: Node, z: Node, k: number): [Node, Node]

Rotate list to the left k steps.

private

F _rotate_left_modulo(x: Node, z: Node, n: number, k: number): [Node, Node]

Rotate non-empty list to the left n steps.

private

F _rotate_left_unknown_length(x: Node, z: Node, k: number): [Node, Node]

Rotate list to the right n steps.

private

F _rotate_right(x: Node, z: Node, k: number): [Node, Node]

Rotate list to the right k steps.

private

F _rotate_right_modulo(x: Node, z: Node, n: number, k: number): [Node, Node]

Rotate non-empty list to the right n steps.

private

F _rotate_right_unknown_length(x: Node, z: Node, k: number): [Node, Node]

Rotate list to the right n steps.

private

F _rotate_to(x: *, y: *, z: *)

private

F _shift(x: Node): Node

Removes first Node from a non-empty list.

private

F _split(x: Node)

Split a list at Node x.

private

F _unshift(x: Node, value: any): Node

Unshift value to list.

public

F concat(x: Node, z: Node, y: Node): Node

Concatenate two input lists.

public

F empty(): Node

Return an empty list.

public

F from(iterable: Iterable): Node

Creates a list from an input iterable.

public

F * iter(first: Node): IterableIterator<Node>

Generator of nodes in list in order.

public

F last(first: Node): Node

Returns the last node of a list.

public

F len(x: Node): number

Compute the length of a list (can be empty).

public

F pop(x: Node): [Node, Node]

Removes last Node from a list.

public

F push(x: Node, z: Node, value: any): Node

Push value to list.

public

F rotate_left(x: Node, z: Node, n: number): [Node, Node]

Do nothing if x is empty or n is zero.

public

F rotate_right(x: Node, z: Node, n: number): [Node, Node]

Do nothing if x is empty or n is zero.

public

F shift(x: Node): [Node, Node]

Removes first Node from a list.

public

F split(x: Node, z: Node): undefined[]

Split a list at a Node.

public

F unshift(x: Node, value: any): Node

Unshift value to list.

public

F * values(first: Node): IterableIterator<any>

Generator of nodes in list in order.