instance
Lake.OrdHashSet.instCoeHashSet
{α : Type u_1}
[Hashable α]
[BEq α]
:
Coe (Lake.OrdHashSet α) (Std.HashSet α)
Equations
- Lake.OrdHashSet.instCoeHashSet = { coe := Lake.OrdHashSet.toHashSet }
Equations
- Lake.OrdHashSet.empty = { toHashSet := Std.HashSet.empty, toArray := #[] }
Instances For
Equations
- Lake.OrdHashSet.instEmptyCollection = { emptyCollection := Lake.OrdHashSet.empty }
Equations
- Lake.OrdHashSet.mkEmpty size = { toHashSet := Std.HashSet.empty, toArray := Array.mkEmpty size }
Instances For
Equations
Instances For
def
Lake.OrdHashSet.appendArray
{α : Type u_1}
[Hashable α]
[BEq α]
(self : Lake.OrdHashSet α)
(arr : Array α)
:
Equations
- self.appendArray arr = Array.foldl (fun (x1 : Lake.OrdHashSet α) (x2 : α) => x1.insert x2) self arr
Instances For
instance
Lake.OrdHashSet.instHAppendArray
{α : Type u_1}
[Hashable α]
[BEq α]
:
HAppend (Lake.OrdHashSet α) (Array α) (Lake.OrdHashSet α)
Equations
- Lake.OrdHashSet.instHAppendArray = { hAppend := Lake.OrdHashSet.appendArray }
Equations
- self.append other = self.appendArray other.toArray
Instances For
Equations
- Lake.OrdHashSet.instAppend = { append := Lake.OrdHashSet.append }
Equations
- Lake.OrdHashSet.ofArray arr = (Lake.OrdHashSet.mkEmpty arr.size).appendArray arr
Instances For
@[inline]
def
Lake.OrdHashSet.all
{α : Type u_1}
[Hashable α]
[BEq α]
(f : α → Bool)
(self : Lake.OrdHashSet α)
:
Equations
- Lake.OrdHashSet.all f self = self.toArray.all f
Instances For
@[inline]
def
Lake.OrdHashSet.any
{α : Type u_1}
[Hashable α]
[BEq α]
(f : α → Bool)
(self : Lake.OrdHashSet α)
:
Equations
- Lake.OrdHashSet.any f self = self.toArray.any f
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
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
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
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
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