flist v0.2.2-dev FList.FNode View Source

This module defines the fingertree nodes and the operations used for the xnodes. If you needn’t add your own functions to FList, you should not use the methods provided in this module directly.

Link to this section Summary

Types

t()

FList.FNode.t is the type stands for the fingertree node

Functions

Return the size of a list that contains some the nodes

Split a list of nodes at the pointed position

Get the element from a node of size == 1

Get the list of branches from a node

Make a tree node from a single element

Make a tree node from a list of elements

Link to this section Types

Link to this type t() View Source
t() :: %FList.FNode{branches: list(), size: non_neg_integer()}

FList.FNode.t is the type stands for the fingertree node.

Link to this section Functions

Return the size of a list that contains some the nodes.

Link to this function splitNodesAt(i, list) View Source
splitNodesAt(non_neg_integer(), [t()]) :: {[t()], t(), [t()]}

Split a list of nodes at the pointed position.

Link to this function unwrap(f_node) View Source
unwrap(t()) :: any()

Get the element from a node of size == 1.

Link to this function unwraps(x) View Source
unwraps(t()) :: list()

Get the list of branches from a node.

Make a tree node from a single element.

Make a tree node from a list of elements.