Libraryless. Click here for Pure Java version (57L/1K).
1 | static ItIt<Int> range(int start, int stop) {
|
2 | ret new ItIt<Int>() {
|
3 | int i = start; |
4 | |
5 | public bool hasNext() { ret i < stop; }
|
6 | public Int next() { ret i++; }
|
7 | }; |
8 | } |
download show line numbers debug dex old transpilations
Travelled to 6 computer(s): bhatertpkbcr, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, vouqrxazstgt
No comments. add comment
| Snippet ID: | #1025973 |
| Snippet name: | range - like in Python |
| Eternal ID of this version: | #1025973/2 |
| Text MD5: | e335d9b76bdc58b33eb22d7c240a9aaa |
| Transpilation MD5: | 70b0ed9dc3f92c0b610d305f45e2ed3e |
| Author: | stefan |
| Category: | javax |
| Type: | JavaX fragment (include) |
| Public (visible to everyone): | Yes |
| Archived (hidden from active list): | No |
| Created/modified: | 2019-11-04 20:41:30 |
| Source code size: | 186 bytes / 8 lines |
| Pitched / IR pitched: | No / No |
| Views / Downloads: | 470 / 613 |
| Version history: | 1 change(s) |
| Referenced in: | [show references] |