range function
creates a list of 2-element lists with pairs
of a and be values.
example:
zip(1,2,3
,4,5,6
) -> [1,4
,2,5
,3,6
]
Implementation
//List<List<T>> zip<T>(List<T> a, List<T> b) =>
// a.mapIndexed((index, element) => [element, b[index]]).toList();
Iterable<int> range({required int last, int first = 0, int step = 1}) sync* {
for (int i = first; i <= last; i += step) {
yield i;
}
}