range2 0.1.1 copy "range2: ^0.1.1" to clipboard
range2: ^0.1.1 copied to clipboard

Dart2 compatible python-like range() function implemented using sync*.

example/range2_example.dart

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);
  }
}
0
likes
40
pub points
0%
popularity

Publisher

unverified uploader

Dart2 compatible python-like range() function implemented using sync*.

Repository (GitHub)
View/report issues

License

MIT (LICENSE)

More

Packages that depend on range2