instance
Lake.OrdHashSet.instCoeOrdHashSetHashSet
{α : Type u_1}
[Hashable α]
[BEq α]
:
Coe (Lake.OrdHashSet α) (Lean.HashSet α)
Equations
- Lake.OrdHashSet.instCoeOrdHashSetHashSet = { coe := Lake.OrdHashSet.toHashSet }
Equations
- Lake.OrdHashSet.empty = { toHashSet := Lean.HashSet.empty, toArray := #[] }
Instances For
Equations
- Lake.OrdHashSet.instEmptyCollectionOrdHashSet = { emptyCollection := Lake.OrdHashSet.empty }
Equations
- Lake.OrdHashSet.mkEmpty size = { toHashSet := Lean.HashSet.empty, toArray := Array.mkEmpty size }
Instances For
Equations
- Lake.OrdHashSet.insert self a = if Lean.HashSet.contains self.toHashSet a = true then self else { toHashSet := Lean.HashSet.insert self.toHashSet a, toArray := Array.push self.toArray a }
Instances For
def
Lake.OrdHashSet.appendArray
{α : Type u_1}
[Hashable α]
[BEq α]
(self : Lake.OrdHashSet α)
(arr : Array α)
:
Equations
- Lake.OrdHashSet.appendArray self arr = Array.foldl (fun (x : Lake.OrdHashSet α) (x_1 : α) => Lake.OrdHashSet.insert x x_1) self arr 0
Instances For
instance
Lake.OrdHashSet.instHAppendOrdHashSetArray
{α : Type u_1}
[Hashable α]
[BEq α]
:
HAppend (Lake.OrdHashSet α) (Array α) (Lake.OrdHashSet α)
Equations
- Lake.OrdHashSet.instHAppendOrdHashSetArray = { hAppend := Lake.OrdHashSet.appendArray }
def
Lake.OrdHashSet.append
{α : Type u_1}
[Hashable α]
[BEq α]
(self : Lake.OrdHashSet α)
(other : Lake.OrdHashSet α)
:
Equations
- Lake.OrdHashSet.append self other = Lake.OrdHashSet.appendArray self other.toArray
Instances For
Equations
- Lake.OrdHashSet.instAppendOrdHashSet = { append := Lake.OrdHashSet.append }
Equations
Instances For
@[inline]
def
Lake.OrdHashSet.all
{α : Type u_1}
[Hashable α]
[BEq α]
(f : α → Bool)
(self : Lake.OrdHashSet α)
:
Equations
- Lake.OrdHashSet.all f self = Array.all self.toArray f 0
Instances For
@[inline]
def
Lake.OrdHashSet.any
{α : Type u_1}
[Hashable α]
[BEq α]
(f : α → Bool)
(self : Lake.OrdHashSet α)
:
Equations
- Lake.OrdHashSet.any f self = Array.any self.toArray f 0
Instances For
@[inline]
def
Lake.OrdHashSet.foldl
{α : Type u_1}
[Hashable α]
[BEq α]
{β : Type u_2}
(f : β → α → β)
(init : β)
(self : Lake.OrdHashSet α)
:
β
Equations
- Lake.OrdHashSet.foldl f init self = Array.foldl f init self.toArray 0
Instances For
@[inline]
def
Lake.OrdHashSet.foldlM
{α : Type u_1}
[Hashable α]
[BEq α]
{m : Type u_2 → Type u_3}
{β : Type u_2}
[Monad m]
(f : β → α → m β)
(init : β)
(self : Lake.OrdHashSet α)
:
m β
Equations
- Lake.OrdHashSet.foldlM f init self = Array.foldlM f init self.toArray 0
Instances For
@[inline]
def
Lake.OrdHashSet.foldr
{α : Type u_1}
[Hashable α]
[BEq α]
{β : Type u_2}
(f : α → β → β)
(init : β)
(self : Lake.OrdHashSet α)
:
β
Equations
- Lake.OrdHashSet.foldr f init self = Array.foldr f init self.toArray (Array.size self.toArray)
Instances For
@[inline]
def
Lake.OrdHashSet.foldrM
{α : Type u_1}
[Hashable α]
[BEq α]
{m : Type u_2 → Type u_3}
{β : Type u_2}
[Monad m]
(f : α → β → m β)
(init : β)
(self : Lake.OrdHashSet α)
:
m β
Equations
- Lake.OrdHashSet.foldrM f init self = Array.foldrM f init self.toArray (Array.size self.toArray)
Instances For
@[inline]
def
Lake.OrdHashSet.forM
{α : Type u_1}
[Hashable α]
[BEq α]
{m : Type u_2 → Type u_3}
[Monad m]
(f : α → m PUnit)
(self : Lake.OrdHashSet α)
:
m PUnit
Equations
- Lake.OrdHashSet.forM f self = Array.forM f self.toArray 0
Instances For
@[inline]
def
Lake.OrdHashSet.forIn
{α : Type u_1}
[Hashable α]
[BEq α]
{m : Type u_2 → Type u_3}
{β : Type u_2}
[Monad m]
(self : Lake.OrdHashSet α)
(init : β)
(f : α → β → m (ForInStep β))
:
m β
Equations
- Lake.OrdHashSet.forIn self init f = Array.forIn self.toArray init f