Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/xtyxtyx/range2

Python-like range() implementation.
https://github.com/xtyxtyx/range2

Last synced: 1 day ago
JSON representation

Python-like range() implementation.

Awesome Lists containing this project

README

        

## Usage

A simple usage example:

```dart
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][tracker].

[tracker]: https://github.com/xtyxtyx/range2/issues