plebeia

Merkle Patricia tree implementation
Library plebeia
type ('acc, 'data) visitor

Traversal handle

type dir = [
| `Bud
| `Extender
| `Side of Segment.side
]
val prepare : 'acc -> 'data -> Plebeia__Cursor.cursor -> ( 'acc -> 'data -> Plebeia__Cursor.cursor -> ( Plebeia__Cursor.cursor * ('acc * ('data * dir) list option), Error.t ) Result.t ) -> ( 'acc, 'data ) visitor
val step : ( 'acc, 'data ) visitor -> ( [ `Finished of Plebeia__Cursor.cursor * 'acc | `Continue of ( 'acc, 'data ) visitor ], Error.t ) Result.t

Run one step of traversal.

val fold : 'acc -> 'data -> Plebeia__Cursor.cursor -> ( 'acc -> 'data -> Plebeia__Cursor.cursor -> ( Plebeia__Cursor.cursor * ('acc * ('data * dir) list option), Error.t ) Result.t ) -> ( Plebeia__Cursor.cursor * 'acc, Error.t ) Result.t

Traversal in one call. Not interleavable.

val ls : Plebeia__Cursor.cursor -> ( Plebeia__Cursor.cursor * (Segment.t * Plebeia__Node.node) list, Error.t ) Result.t
val ls_rec : Plebeia__Cursor.cursor -> ( Plebeia__Cursor.cursor * (Segment.t list * Plebeia__Node.node) list, Error.t ) Result.t