@[instance_reducible]
instance Lake.OrdHashSet.instCoeHashSet {α : Type u_1} [Hashable α] [BEq α] :
Coe (OrdHashSet α) (Std.HashSet α)
Equations
Instances For
@[instance_reducible]
Equations
- Lake.OrdHashSet.instEmptyCollection = { emptyCollection := Lake.OrdHashSet.empty }
Equations
- Lake.OrdHashSet.mkEmpty size = { toHashSet := ∅, toArray := Array.mkEmpty size }
Instances For
def Lake.OrdHashSet.appendArray {α : Type u_1} [Hashable α] [BEq α] (self : OrdHashSet α) (arr : Array α) :
Equations
- self.appendArray arr = Array.foldl (fun (x1 : Lake.OrdHashSet α) (x2 : α) => x1.insert x2) self arr
Instances For
@[instance_reducible]
instance Lake.OrdHashSet.instHAppendArray {α : Type u_1} [Hashable α] [BEq α] :
HAppend (OrdHashSet α) (Array α) (OrdHashSet α)
Equations
Equations
- self.append other = self.appendArray other.toArray
Instances For
@[instance_reducible]
Equations
- Lake.OrdHashSet.instAppend = { append := Lake.OrdHashSet.append }
Equations
- Lake.OrdHashSet.ofArray arr = (Lake.OrdHashSet.mkEmpty arr.size).appendArray arr
Instances For
@[inline]
Equations
- Lake.OrdHashSet.all f self = self.toArray.all f
Instances For
@[inline]
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 : 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 : 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 : 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 : 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 : OrdHashSet α) :
m PUnit
Equations
- Lake.OrdHashSet.forM f self = Array.forM f self.toArray
Instances For
@[instance_reducible]
instance Lake.OrdHashSet.instForInOfMonad {α : Type u_1} [Hashable α] [BEq α] {m : Type u_2 → Type u_3} [Monad m] :
ForIn m (OrdHashSet α) α
Equations
- Lake.OrdHashSet.instForInOfMonad = { forIn := fun {β : Type ?u.2} => Lake.OrdHashSet.forIn }