Documentation

Init.Data.Range.Polymorphic.Iterators

@[inline]
def Std.PRange.Internal.iter {sl su : BoundShape} {α : Type u_1} [UpwardEnumerable α] [BoundedUpwardEnumerable sl α] (r : PRange { lower := sl, upper := su } α) :
Iter α

Internal function that constructs an iterator for a PRange. This is an internal function. Use PRange.iter instead, which requires importing Std.Data.Iterators.

Equations
Instances For
    @[inline]

    Returns the elements of the given range as a list in ascending order, given that ranges of the given type and shape are finite and support this function.

    Equations
    Instances For
      @[inline]

      Returns the elements of the given range as an array in ascending order, given that ranges of the given type and shape are finite and support this function.

      Equations
      Instances For

        Iterators for ranges implementing RangeSize support the size function.

        Equations
        • One or more equations did not get rendered due to their size.
        @[inline]
        def Std.PRange.size {sl su : BoundShape} {α : Type u_1} [UpwardEnumerable α] [BoundedUpwardEnumerable sl α] [SupportsUpperBound su α] (r : PRange { lower := sl, upper := su } α) [Iterators.IteratorSize (RangeIterator su α) Id] :

        Returns the number of elements contained in the given range, given that ranges of the given type and shape support this function.

        Equations
        Instances For