File: .lake/packages/lean4/src/lean/lake/Lake/Util/RBArray.lean

full_name: Lake.RBArray.toArray
code: /--
There are two ways to think of this type:
* As an `Array` of values with an `RBMap` key-value index for the key `α`.
* As an `RBMap` that preserves insertion order, but is optimized for
iteration-by-values. Thus, it does not store the order of keys.
-/
structure RBArray (α : Type u) (β : Type v) (cmp : α → α → Ordering) where
  toRBMap : RBMap α β cmp
  toArray : Array β
goal: Array β

full_name: Lake.RBArray.toRBMap
code: /--
There are two ways to think of this type:
* As an `Array` of values with an `RBMap` key-value index for the key `α`.
* As an `RBMap` that preserves insertion order, but is optimized for
iteration-by-values. Thus, it does not store the order of keys.
-/
structure RBArray (α : Type u) (β : Type v) (cmp : α → α → Ordering) where
  toRBMap : RBMap α β cmp
  toArray : Array β
goal: Lean.RBMap α β cmp

full_name: Lake.RBArray
code: /--
There are two ways to think of this type:
* As an `Array` of values with an `RBMap` key-value index for the key `α`.
* As an `RBMap` that preserves insertion order, but is optimized for
iteration-by-values. Thus, it does not store the order of keys.
-/
structure RBArray (α : Type u) (β : Type v) (cmp : α → α → Ordering) where
  toRBMap : RBMap α β cmp
  toArray : Array β
goal: Type (max u v)

full_name: Lake.RBArray.empty
code: def empty : RBArray α β cmp 
goal: Lake.RBArray α β cmp

full_name: Lake.RBArray.instEmptyCollection
code: instance : EmptyCollection (RBArray α β cmp) 
goal: EmptyCollection (Lake.RBArray α β cmp)

full_name: Lake.RBArray.mkEmpty
code: def mkEmpty (size : Nat) : RBArray α β cmp 
goal: Lake.RBArray α β cmp

full_name: Lake.RBArray.find?
code: @[inline] def find? (self : RBArray α β cmp) (a : α) : Option β 
goal: Option β

full_name: Lake.RBArray.contains
code: @[inline] def contains (self : RBArray α β cmp) (a : α) : Bool 
goal: Bool

full_name: Lake.RBArray.insert
code: /-- Insert `b` with the key `a`. Does nothing if the key is already present. -/
def insert (self : RBArray α β cmp) (a : α) (b : β) : RBArray α β cmp 
goal: Lake.RBArray α β cmp

full_name: Lake.RBArray.all
code: @[inline] def all (f : β → Bool) (self : RBArray α β cmp) : Bool  
goal: Bool

full_name: Lake.RBArray.any
code: @[inline] def any (f : β → Bool) (self : RBArray α β cmp) : Bool  
goal: Bool

full_name: Lake.RBArray.foldl
code: @[inline] def foldl (f : σ → β → σ) (init : σ) (self : RBArray α β cmp) : σ  
goal: σ

full_name: Lake.RBArray.foldlM
code: @[inline] def foldlM [Monad m] (f : σ → β → m σ) (init : σ) (self : RBArray α β cmp) : m σ 
goal: m σ

full_name: Lake.RBArray.foldr
code: @[inline] def foldr (f : β → σ → σ) (init : σ) (self : RBArray α β cmp) : σ 
goal: σ

full_name: Lake.RBArray.foldrM
code: @[inline] def foldrM [Monad m] (f : β → σ → m σ) (init : σ) (self : RBArray α β cmp) : m σ 
goal: m σ

full_name: Lake.RBArray.forM
code: @[inline] def forM [Monad m] (f : β → m PUnit) (self : RBArray α β cmp) : m PUnit 
goal: m PUnit

full_name: Lake.RBArray.forIn
code: @[inline] protected def forIn [Monad m] (self : RBArray α β cmp) (init : σ) (f : β → σ → m (ForInStep σ)) : m σ 
goal: m σ

full_name: Lake.RBArray.instForIn
code: instance : ForIn m (RBArray α β cmp) β 
goal: ForIn m (Lake.RBArray α β cmp) β

full_name: Lake.mkRBArray
code: @[inline] def mkRBArray  (f : β → α) (vs : Array β) : RBArray α β cmp 
goal: Lake.RBArray α β cmp