onflow / atree

Atree provides scalable arrays and scalable ordered maps.
https://onflow.org
Apache License 2.0
39 stars 16 forks source link

Add Array.IterateRange and Array.RangeIterator for range iteration #237

Closed fxamacker closed 2 years ago

fxamacker commented 2 years ago

Issue To Be Solved

Cadence 1314

Suggested Solution

Add Array.IterateRange and Array.RangeIterator for range iteration with start index and end index.

Return SliceOutOfBoundsError when start index and/or end index is out of bounds.

Return InvalidSliceIndexError when start index > end index. This can happen even if range is within bounds.