Documentation

Init.Data.Slice.Operations

instance Std.Slice.instToIteratorMk {γ : Type u_1} {m : Type u_2 → Type u_3} {β : Type u_2} {x : γ} [Iterators.ToIterator x m β] :
Iterators.ToIterator { internalRepresentation := x } m β
Equations
    @[inline]
    def Std.Slice.Internal.iter {γ : Type u_1} {β : Type u_2} (s : Slice γ) [Iterators.ToIterator s Id β] :
    Iter β

    Internal function to obtain an iterator from a slice. Users should import Std.Data.Iterators and use Std.Slice.iter instead.

    Equations
      Instances For
        @[inline]

        Returns the number of elements with distinct indices in the given slice.

        Example: #[1, 1, 1][0...2].size = 2.

        Equations
          Instances For
            @[inline]

            Allocates a new array that contains the elements of the slice.

            Equations
              Instances For
                @[inline]

                Allocates a new list that contains the elements of the slice.

                Equations
                  Instances For
                    @[inline]

                    Allocates a new list that contains the elements of the slice in reverse order.

                    Equations
                      Instances For