Usage

A simple usage example:

import 'package:range2/range2.dart';

main() {
  print('${range(1, 5)}');             // (1, 2, 3, 4) 
  print('${range(1, 10,  3)}');        // (1, 4, 7)
  print('${range(-5, 0)}');            // (-5, -4, -3, -2, -1)
  print('${range(-5, -10, -1)}');      // (-5, -6, -7, -8, -9)

  for (var n in range(1, 10, 2)) {
    print(n);
  }
  // 1
  // 3
  // 5
  // 7
  // 9
}

Features and bugs

Please file feature requests and bugs at the issue tracker.

Libraries

range2
Python-like range() function implementation.