Home Manual Reference Source

References

summary
public

F Node(value: any)

Base node class.

private

F _append(a: Node, x: Node)

Optimization of _concat when x contains a single element.

private

F _concat(x: Node, y: Node)

Concatenate two input lists.

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 _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 _remove(x: Node)

Removes input Node from its list.

private

Rotate list to the left n steps.

private

Rotate list to the right n steps.

private

F _shift(x: Node): Node

Removes first Node from a non-empty list.

public

F concat(x: 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 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, value: any): Node

Push value to list.

public

Do nothing if x is empty or n is zero.

public

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 unshift(x: Node, value: Object): Node

Unshift value to list.

public

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

Generator of nodes in list in order.