range2 0.1.1 range2: ^0.1.1 copied to clipboard
Dart2 compatible python-like range() function implemented using sync*.
import 'package:range2/range2.dart';
main() {
print('${range(1, 5)}');
print('${range(1, 10, 3)}');
print('${range(-5, 0)}');
print('${range(-5, -10, -1)}');
for (var n in range(1, 10, 2)) {
print(n);
}
}