Documentation
¶
Index ¶
- type Trie
- func (t *Trie[E, T]) Delete(path []E) (ok bool)
- func (t *Trie[E, T]) Insert(path []E, value T) bool
- func (t *Trie[E, T]) List(prefix []E) func(yield func(name E, value T) bool)
- func (t *Trie[E, T]) Load(path []E) (value T, ok bool)
- func (t *Trie[E, T]) ReduceAll(reducer func(parent T, child T) (newParent T)) T
- func (t *Trie[E, T]) ReducePartial(path []E, reducer func(parent T, child T) (newParent T))
- func (t *Trie[E, T]) Store(path []E, value T) (ok bool)
- func (t *Trie[E, T]) Walk(prefix []E) func(yield func(path []E, value T) bool)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Trie ¶
type Trie[E comparable, T any] struct { // contains filtered or unexported fields }
func New ¶
func New[E comparable, T any](value T) *Trie[E, T]
func (*Trie[E, T]) ReduceAll ¶
func (t *Trie[E, T]) ReduceAll(reducer func(parent T, child T) (newParent T)) T
func (*Trie[E, T]) ReducePartial ¶
func (t *Trie[E, T]) ReducePartial(path []E, reducer func(parent T, child T) (newParent T))
Click to show internal directories.
Click to hide internal directories.