instance
Lean.PersistentHashSet.instForInPersistentHashSet
{α : Type u_1}
[BEq α]
[Hashable α]
{m : Type u_2 → Type u_3}
:
ForIn m (Lean.PersistentHashSet α) α
Equations
- One or more equations did not get rendered due to their size.
@[specialize #[]]
def
Lean.PersistentHashSet.anyM
{α : Type u_1}
[BEq α]
[Hashable α]
{m : Type → Type u_2}
[Monad m]
(s : Lean.PersistentHashSet α)
(f : α → m Bool)
:
m Bool
Returns true
if f
returns true
for any element of the set.
Equations
- One or more equations did not get rendered due to their size.
Instances For
@[inline]
def
Lean.PersistentHashSet.any
{α : Type u_1}
[BEq α]
[Hashable α]
(s : Lean.PersistentHashSet α)
(f : α → Bool)
:
Returns true
if f
returns true
for any element of the set.
Equations
Instances For
@[specialize #[]]
def
Lean.PersistentHashSet.allM
{α : Type u_1}
[BEq α]
[Hashable α]
{m : Type → Type u_2}
[Monad m]
(s : Lean.PersistentHashSet α)
(f : α → m Bool)
:
m Bool
Returns true
if f
returns true
for all elements of the set.
Equations
- One or more equations did not get rendered due to their size.
Instances For
@[inline]
def
Lean.PersistentHashSet.all
{α : Type u_1}
[BEq α]
[Hashable α]
(s : Lean.PersistentHashSet α)
(f : α → Bool)
:
Returns true
if f
returns true
for all elements of the set.
Equations
Instances For
Equations
- One or more equations did not get rendered due to their size.
@[inline]
def
Lean.PersistentHashSet.insert'
{α : Type u_1}
[BEq α]
[Hashable α]
(s : Lean.PersistentHashSet α)
(a : α)
:
Similar to insert
, but also returns a Boolean flag indicating whether an
existing entry has been replaced with a => b
.
Equations
- Lean.PersistentHashSet.insert' s a = let oldSize := Lean.PersistentHashSet.size s; let s := Lean.PersistentHashSet.insert s a; (s, Lean.PersistentHashSet.size s == oldSize)
Instances For
def
Lean.PersistentHashSet.insertMany
{α : Type u_1}
[BEq α]
[Hashable α]
{ρ : Type u_2}
[ForIn Id ρ α]
(s : Lean.PersistentHashSet α)
(as : ρ)
:
Insert all elements from a collection into a PersistentHashSet
.
Equations
- One or more equations did not get rendered due to their size.
Instances For
@[inline]
Obtain a PersistentHashSet
from an array.
Equations
- Lean.PersistentHashSet.ofArray as = Lean.PersistentHashSet.insertMany Lean.PersistentHashSet.empty as
Instances For
@[inline]
Obtain a PersistentHashSet
from a list.
Equations
- Lean.PersistentHashSet.ofList as = Lean.PersistentHashSet.insertMany Lean.PersistentHashSet.empty as
Instances For
@[inline]
def
Lean.PersistentHashSet.merge
{α : Type u_1}
[BEq α]
[Hashable α]
(s : Lean.PersistentHashSet α)
(t : Lean.PersistentHashSet α)
:
Merge two PersistentHashSet
s.