Documentation

Lean.Meta.DiscrTree.Util

partial def Lean.Meta.DiscrTree.Trie.foldM {m : Type u_1 → Type u_2} {σ : Type u_1} {α : Type} [Monad m] (initialKeys : Array Key) (f : σArray Keyαm σ) (init : σ) :
Trie αm σ

Monadically fold the keys and values stored in a Trie.

@[inline]
def Lean.Meta.DiscrTree.Trie.fold {σ : Type u_1} {α : Type} (initialKeys : Array Key) (f : σArray Keyασ) (init : σ) (t : Trie α) :
σ

Fold the keys and values stored in a Trie.

Equations
    Instances For
      partial def Lean.Meta.DiscrTree.Trie.foldValuesM {m : Type u_1 → Type u_2} {σ : Type u_1} {α : Type} [Monad m] (f : σαm σ) (init : σ) :
      Trie αm σ

      Monadically fold the values stored in a Trie.

      @[inline]
      def Lean.Meta.DiscrTree.Trie.foldValues {σ : Type u_1} {α : Type} (f : σασ) (init : σ) (t : Trie α) :
      σ

      Fold the values stored in a Trie.

      Equations
        Instances For
          partial def Lean.Meta.DiscrTree.Trie.size {α : Type} :
          Trie αNat

          The number of values stored in a Trie.

          @[inline]
          def Lean.Meta.DiscrTree.foldM {m : Type u_1 → Type u_2} {σ : Type u_1} {α : Type} [Monad m] (f : σArray Keyαm σ) (init : σ) (t : DiscrTree α) :
          m σ

          Monadically fold over the keys and values stored in a DiscrTree.

          Equations
            Instances For
              @[inline]
              def Lean.Meta.DiscrTree.fold {σ : Type u_1} {α : Type} (f : σArray Keyασ) (init : σ) (t : DiscrTree α) :
              σ

              Fold over the keys and values stored in a DiscrTree

              Equations
                Instances For
                  @[inline]
                  def Lean.Meta.DiscrTree.foldValuesM {m : Type u_1 → Type u_2} {σ : Type u_1} {α : Type} [Monad m] (f : σαm σ) (init : σ) (t : DiscrTree α) :
                  m σ

                  Monadically fold over the values stored in a DiscrTree.

                  Equations
                    Instances For
                      @[inline]
                      def Lean.Meta.DiscrTree.foldValues {σ : Type u_1} {α : Type} (f : σασ) (init : σ) (t : DiscrTree α) :
                      σ

                      Fold over the values stored in a DiscrTree.

                      Equations
                        Instances For
                          @[inline]
                          def Lean.Meta.DiscrTree.containsValueP {α : Type} (t : DiscrTree α) (f : αBool) :

                          Check for the presence of a value satisfying a predicate.

                          Equations
                            Instances For
                              @[inline]

                              Extract the values stored in a DiscrTree.

                              Equations
                                Instances For
                                  @[inline]

                                  Extract the keys and values stored in a DiscrTree.

                                  Equations
                                    Instances For
                                      @[inline]

                                      Get the number of values stored in a DiscrTree. O(n) in the size of the tree.

                                      Equations
                                        Instances For
                                          partial def Lean.Meta.DiscrTree.Trie.mapArraysM {m : TypeType} [Monad m] {α β : Type} (t : Trie α) (f : Array αm (Array β)) :
                                          m (Trie β)

                                          Apply a monadic function to the array of values at each node in a DiscrTree.

                                          def Lean.Meta.DiscrTree.mapArraysM {m : TypeType} [Monad m] {α β : Type} (d : DiscrTree α) (f : Array αm (Array β)) :
                                          m (DiscrTree β)

                                          Apply a monadic function to the array of values at each node in a DiscrTree.

                                          Equations
                                            Instances For
                                              def Lean.Meta.DiscrTree.mapArrays {α β : Type} (d : DiscrTree α) (f : Array αArray β) :

                                              Apply a function to the array of values at each node in a DiscrTree.

                                              Equations
                                                Instances For