# Rlp-tree

RLP trees.

This is a tagged union type, introduced by fty::deftagsum.

##### Member Tags → Types

`:leaf` → rlp-tree-leaf
`:branch` → rlp-tree-branch

An RLP tree has
a byte array at each leaf.
A branching node of the tree carries no additional information
besides the structure implied by
the sequence of its (zero or more) subtrees.

The definition of type rlp-tree
corresponds to \mathbb{T} [YP:(176)].
The definition of type rlp-tree-list
corresponds to \mathbb{L} [YP:(177)];
we use true lists to model sequences of subtrees.

These trees are called `items' in [Wiki:RLP];
we prefer the term `tree', because it seems clearer.
The byte sequences at the leaves are called
`byte arrays' in [YP:B] and [Wiki:RLP], and also `strings' in [Wiki:RLP];
we prefer the former term, because it seems clearer.

### Subtopics

- Rlp-tree-case
- Case macro for the different kinds of rlp-tree structures.
- Rlp-tree-equiv
- Basic equivalence relation for rlp-tree structures.
- Rlp-treep
- Recognizer for rlp-tree structures.
- Rlp-tree-leaf
- Rlp-tree-branch
- Rlp-tree-kind
- Get the
*kind* (tag) of a rlp-tree structure. - Rlp-tree-list
- True lists of RLP trees.
- Rlp-tree-fix
- Fixing function for rlp-tree structures.
- Rlp-tree-count
- Measure for recurring over rlp-tree structures.