inductive Lean.PersistentHashMap.Entry (α : Type u) (β : Type v) (σ : Type w) :
Type (max (max u v) w)
- entry {α : Type u} {β : Type v} {σ : Type w} (key : α) (val : β) : Entry α β σ
- ref {α : Type u} {β : Type v} {σ : Type w} (node : σ) : Entry α β σ
- null {α : Type u} {β : Type v} {σ : Type w} : Entry α β σ
Instances For
Instances For
def Lean.PersistentHashMap.isEmpty {α : Type u_1} {β : Type u_2} {x✝ : BEq α} {x✝¹ : Hashable α} :
PersistentHashMap α β → Bool
Instances For
@[instance_reducible]
instance Lean.PersistentHashMap.instInhabited {α : Type u_1} {β : Type u_2} [BEq α] [Hashable α] :
Inhabited (PersistentHashMap α β)
Instances For
@[reducible, inline]
Instances For
@[reducible, inline]
Instances For
@[reducible, inline]
Instances For
- mk {α : Type u_1} {β : Type u_2} (keys : Array α) (vals : Array β) (h : keys.size = vals.size) : IsCollisionNode (Node.collision keys vals h)
Instances For
@[reducible, inline]
Instances For
- mk {α : Type u_1} {β : Type u_2} (entries : Array (Entry α β (Node α β))) : IsEntriesNode (Node.entries entries)
Instances For
@[reducible, inline]
Instances For
partial def Lean.PersistentHashMap.insertAtCollisionNodeAux {α : Type u_1} {β : Type u_2} [BEq α] :
CollisionNode α β → Nat → α → β → CollisionNode α β
def Lean.PersistentHashMap.insertAtCollisionNode {α : Type u_1} {β : Type u_2} [BEq α] :
CollisionNode α β → α → β → CollisionNode α β
Instances For
def Lean.PersistentHashMap.getCollisionNodeSize {α : Type u_1} {β : Type u_2} :
CollisionNode α β → Nat
Instances For
def Lean.PersistentHashMap.mkCollisionNode {α : Type u_1} {β : Type u_2} (k₁ : α) (v₁ : β) (k₂ : α) (v₂ : β) :
Node α β
Instances For
def Lean.PersistentHashMap.insert {α : Type u_1} {β : Type u_2} {x✝ : BEq α} {x✝¹ : Hashable α} :
PersistentHashMap α β → α → β → PersistentHashMap α β
Instances For
def Lean.PersistentHashMap.find? {α : Type u_1} {β : Type u_2} {x✝ : BEq α} {x✝¹ : Hashable α} :
PersistentHashMap α β → α → Option β
Instances For
@[instance_reducible]
instance Lean.PersistentHashMap.instGetElemOptionTrue {α : Type u_1} {β : Type u_2} {x✝ : BEq α} {x✝¹ : Hashable α} :
GetElem (PersistentHashMap α β) α (Option β) fun (x : PersistentHashMap α β) (x_1 : α) => True
@[inline]
def Lean.PersistentHashMap.findD {α : Type u_1} {β : Type u_2} {x✝ : BEq α} {x✝¹ : Hashable α} (m : PersistentHashMap α β) (a : α) (b₀ : β) :
β
Instances For
@[inline]
def Lean.PersistentHashMap.find! {α : Type u_1} {β : Type u_2} {x✝ : BEq α} {x✝¹ : Hashable α} [Inhabited β] (m : PersistentHashMap α β) (a : α) :
β
Instances For
def Lean.PersistentHashMap.findEntry? {α : Type u_1} {β : Type u_2} {x✝ : BEq α} {x✝¹ : Hashable α} :
PersistentHashMap α β → α → Option (α × β)
Instances For
@[inline]
def Lean.PersistentHashMap.findKeyD {α : Type u_1} {β : Type u_2} {x✝ : BEq α} {x✝¹ : Hashable α} (m : PersistentHashMap α β) (a a₀ : α) :
α
A more efficient m.findEntry? a |>.map (·.1) |>.getD a₀
Instances For
def Lean.PersistentHashMap.contains {α : Type u_1} {β : Type u_2} [BEq α] [Hashable α] :
PersistentHashMap α β → α → Bool
Instances For
def Lean.PersistentHashMap.erase {α : Type u_1} {β : Type u_2} {x✝ : BEq α} {x✝¹ : Hashable α} :
PersistentHashMap α β → α → PersistentHashMap α β
Instances For
@[inline]
def Lean.PersistentHashMap.alter {α : Type u_1} {β : Type u_2} {x✝ : BEq α} {x✝¹ : Hashable α} :
PersistentHashMap α β → α → (Option β → Option β) → PersistentHashMap α β
Instances For
def Lean.PersistentHashMap.foldl {σ : Type w} {α : Type u_1} {β : Type u_2} {x✝ : BEq α} {x✝¹ : Hashable α} (map : PersistentHashMap α β) (f : σ → α → β → σ) (init : σ) :
σ
Instances For
@[implemented_by _private.Lean.Data.PersistentHashMap.0.Lean.PersistentHashMap.foldlNewEntriesUnsafe]
def Lean.PersistentHashMap.foldlNewEntries {σ : Type w} {α : Type u_1} {β : Type u_2} {x✝ : BEq α} {x✝¹ : Hashable α} (f : σ → α → β → σ) (new old : PersistentHashMap α β) (init : σ) :
σ
Folds f over the entries of new whose keys are not in old, in the order of foldl. If new
was derived from old by insertions, the cost is proportional to the number of insertions rather
than to the size of new.
Instances For
def Lean.PersistentHashMap.mapM {α : Type u} {β : Type v} {σ : Type u} {m : Type u → Type w} [Monad m] {x✝ : BEq α} {x✝¹ : Hashable α} (pm : PersistentHashMap α β) (f : β → m σ) :
m (PersistentHashMap α σ)
Instances For
def Lean.PersistentHashMap.map {α : Type u} {β : Type v} {σ : Type u} {x✝ : BEq α} {x✝¹ : Hashable α} (pm : PersistentHashMap α β) (f : β → σ) :
Instances For
def Lean.PersistentHashMap.toList {α : Type u_1} {β : Type u_2} {x✝ : BEq α} {x✝¹ : Hashable α} (m : PersistentHashMap α β) :
Instances For
def Lean.PersistentHashMap.toArray {α : Type u_1} {β : Type u_2} {x✝ : BEq α} {x✝¹ : Hashable α} (m : PersistentHashMap α β) :
Instances For
def Lean.PersistentHashMap.stats {α : Type u_1} {β : Type u_2} {x✝ : BEq α} {x✝¹ : Hashable α} (m : PersistentHashMap α β) :