Documentation

Lean.Data.PersistentHashSet

@[reducible, inline]
abbrev Lean.PHashSet (α : Type u) [BEq α] [Hashable α] :
Equations
@[inline]
def Lean.PersistentHashSet.isEmpty {α : Type u_1} {x✝ : BEq α} {x✝¹ : Hashable α} (s : PersistentHashSet α) :
Equations
  • s.isEmpty = s.set.isEmpty
@[inline]
def Lean.PersistentHashSet.insert {α : Type u_1} {x✝ : BEq α} {x✝¹ : Hashable α} (s : PersistentHashSet α) (a : α) :
Equations
  • s.insert a = { set := s.set.insert a () }
@[inline]
def Lean.PersistentHashSet.erase {α : Type u_1} {x✝ : BEq α} {x✝¹ : Hashable α} (s : PersistentHashSet α) (a : α) :
Equations
  • s.erase a = { set := s.set.erase a }
@[inline]
def Lean.PersistentHashSet.find? {α : Type u_1} {x✝ : BEq α} {x✝¹ : Hashable α} (s : PersistentHashSet α) (a : α) :
Equations
@[inline]
def Lean.PersistentHashSet.contains {α : Type u_1} {x✝ : BEq α} {x✝¹ : Hashable α} (s : PersistentHashSet α) (a : α) :
Equations
  • s.contains a = s.set.contains a
@[inline]
def Lean.PersistentHashSet.foldM {α : Type u_1} {x✝ : BEq α} {x✝¹ : Hashable α} {β : Type v} {m : Type v → Type v} [Monad m] (f : βαm β) (init : β) (s : PersistentHashSet α) :
m β
Equations
@[inline]
def Lean.PersistentHashSet.fold {α : Type u_1} {x✝ : BEq α} {x✝¹ : Hashable α} {β : Type v} (f : βαβ) (init : β) (s : PersistentHashSet α) :
β
Equations
def Lean.PersistentHashSet.toList {α : Type u_1} {x✝ : BEq α} {x✝¹ : Hashable α} (s : PersistentHashSet α) :
List α
Equations