Documentation

Lean.Data.NameTrie

def Lean.NameTrie.insert {β : Type u_1} (t : Lean.NameTrie β) (n : Lean.Name) (b : β) :
Equations
def Lean.NameTrie.find? {β : Type u_1} (t : Lean.NameTrie β) (k : Lean.Name) :
Equations
@[inline]
def Lean.NameTrie.foldMatchingM {m : Type u_1 → Type u_2} {β : Type u_3} {σ : Type u_1} [Monad m] (t : Lean.NameTrie β) (k : Lean.Name) (init : σ) (f : βσm σ) :
m σ
Equations
@[inline]
def Lean.NameTrie.foldM {m : Type u_1 → Type u_2} {β : Type u_3} {σ : Type u_1} [Monad m] (t : Lean.NameTrie β) (init : σ) (f : βσm σ) :
m σ
Equations
@[inline]
def Lean.NameTrie.forMatchingM {m : TypeType u_1} {β : Type u_2} [Monad m] (t : Lean.NameTrie β) (k : Lean.Name) (f : βm Unit) :
Equations
@[inline]
def Lean.NameTrie.forM {m : TypeType u_1} {β : Type u_2} [Monad m] (t : Lean.NameTrie β) (f : βm Unit) :
Equations
Equations
  • t.matchingToArray k = (t.foldMatchingM k #[] fun (v : β) (acc : Array β) => acc.push v).run
def Lean.NameTrie.toArray {β : Type u_1} (t : Lean.NameTrie β) :
Equations
  • t.toArray = (t.foldM #[] fun (v : β) (acc : Array β) => acc.push v).run