- node: {α : Type u} → Array (Lean.PersistentArrayNode α) → Lean.PersistentArrayNode α
- leaf: {α : Type u} → Array α → Lean.PersistentArrayNode α
Instances For
instance
Lean.instInhabitedPersistentArrayNode :
{a : Type u_1} → Inhabited (Lean.PersistentArrayNode a)
Instances For
- root : Lean.PersistentArrayNode α
- tail : Array α
- size : Nat
- shift : USize
- tailOff : Nat
Instances For
@[inline, reducible]
Instances For
@[inline, reducible]
Instances For
@[inline, reducible]
Instances For
partial def
Lean.PersistentArray.getAux
{α : Type u}
[Inhabited α]
:
Lean.PersistentArrayNode α → USize → USize → α
Instances For
instance
Lean.PersistentArray.instGetElemPersistentArrayNatLtInstLTNatSize
{α : Type u}
[Inhabited α]
:
GetElem (Lean.PersistentArray α) Nat α fun as i => i < as.size
partial def
Lean.PersistentArray.setAux
{α : Type u}
:
Lean.PersistentArrayNode α → USize → USize → α → Lean.PersistentArrayNode α
Instances For
@[specialize #[]]
@[specialize #[]]
def
Lean.PersistentArray.modify
{α : Type u}
[Inhabited α]
(t : Lean.PersistentArray α)
(i : Nat)
(f : α → α)
:
Instances For
partial def
Lean.PersistentArray.insertNewLeaf
{α : Type u}
:
Lean.PersistentArrayNode α → USize → USize → Array α → Lean.PersistentArrayNode α
Instances For
Instances For
partial def
Lean.PersistentArray.popLeaf
{α : Type u}
:
Lean.PersistentArrayNode α → Option (Array α) × Array (Lean.PersistentArrayNode α)
Instances For
@[specialize #[]]
def
Lean.PersistentArray.foldlM
{α : Type u}
{m : Type v → Type w}
[Monad m]
{β : Type v}
(t : Lean.PersistentArray α)
(f : β → α → m β)
(init : β)
(start : optParam Nat 0)
:
m β
Instances For
@[specialize #[]]
def
Lean.PersistentArray.foldrM
{α : Type u}
{m : Type v → Type w}
{β : Type v}
[Monad m]
(t : Lean.PersistentArray α)
(f : α → β → m β)
(init : β)
:
m β
Instances For
@[specialize #[]]
def
Lean.PersistentArray.forIn
{α : Type u}
{m : Type v → Type w}
[Monad m]
{β : Type v}
(t : Lean.PersistentArray α)
(init : β)
(f : α → β → m (ForInStep β))
:
m β
Instances For
instance
Lean.PersistentArray.instForInPersistentArray
{α : Type u}
{m : Type v → Type w}
:
ForIn m (Lean.PersistentArray α) α
@[specialize #[]]
partial def
Lean.PersistentArray.findSomeMAux
{α : Type u}
{m : Type v → Type w}
[Monad m]
{β : Type v}
(f : α → m (Option β))
:
Lean.PersistentArrayNode α → m (Option β)
@[specialize #[]]
def
Lean.PersistentArray.findSomeM?
{α : Type u}
{m : Type v → Type w}
[Monad m]
{β : Type v}
(t : Lean.PersistentArray α)
(f : α → m (Option β))
:
m (Option β)
Instances For
@[specialize #[]]
partial def
Lean.PersistentArray.findSomeRevMAux
{α : Type u}
{m : Type v → Type w}
[Monad m]
{β : Type v}
(f : α → m (Option β))
:
Lean.PersistentArrayNode α → m (Option β)
@[specialize #[]]
def
Lean.PersistentArray.findSomeRevM?
{α : Type u}
{m : Type v → Type w}
[Monad m]
{β : Type v}
(t : Lean.PersistentArray α)
(f : α → m (Option β))
:
m (Option β)
Instances For
@[specialize #[]]
def
Lean.PersistentArray.forM
{α : Type u}
{m : Type v → Type w}
[Monad m]
(t : Lean.PersistentArray α)
(f : α → m PUnit)
:
m PUnit
Instances For
@[inline]
def
Lean.PersistentArray.foldl
{α : Type u}
{β : Type u_1}
(t : Lean.PersistentArray α)
(f : β → α → β)
(init : β)
(start : optParam Nat 0)
:
β
Instances For
@[inline]
def
Lean.PersistentArray.foldr
{α : Type u}
{β : Type u_1}
(t : Lean.PersistentArray α)
(f : α → β → β)
(init : β)
:
β
Instances For
@[inline]
Instances For
Instances For
def
Lean.PersistentArray.append
{α : Type u}
(t₁ : Lean.PersistentArray α)
(t₂ : Lean.PersistentArray α)
:
Instances For
@[inline]
def
Lean.PersistentArray.findSome?
{α : Type u}
{β : Type u_1}
(t : Lean.PersistentArray α)
(f : α → Option β)
:
Option β
Instances For
@[inline]
def
Lean.PersistentArray.findSomeRev?
{α : Type u}
{β : Type u_1}
(t : Lean.PersistentArray α)
(f : α → Option β)
:
Option β
Instances For
Instances For
@[specialize #[]]
partial def
Lean.PersistentArray.anyMAux
{α : Type u}
{m : Type → Type w}
[Monad m]
(p : α → m Bool)
:
Lean.PersistentArrayNode α → m Bool
@[specialize #[]]
def
Lean.PersistentArray.anyM
{α : Type u}
{m : Type → Type w}
[Monad m]
(t : Lean.PersistentArray α)
(p : α → m Bool)
:
m Bool
Instances For
@[inline]
def
Lean.PersistentArray.allM
{α : Type u}
{m : Type → Type w}
[Monad m]
(a : Lean.PersistentArray α)
(p : α → m Bool)
:
m Bool
Instances For
@[inline]
Instances For
@[inline]
Instances For
@[specialize #[]]
def
Lean.PersistentArray.mapM
{α : Type u}
{m : Type u → Type v}
[Monad m]
{β : Type u}
(f : α → m β)
(t : Lean.PersistentArray α)
:
m (Lean.PersistentArray β)
Instances For
@[inline]
Instances For
Instances For
Equations
- List.toPArray'.loop [] x = x
- List.toPArray'.loop (x_2 :: xs) x = List.toPArray'.loop xs (Lean.PersistentArray.push x x_2)