Libraryless. Click here for Pure Java version (2561L/16K).
1 | static ItIt<Int> countIterator_exclusive_backwards(int a, int b) {
|
2 | ret new ItIt<Int>() {
|
3 | int i = a; |
4 | |
5 | public bool hasNext() { ret i > b; }
|
6 | public Int next() { ret i--; }
|
7 | }; |
8 | } |
9 | |
10 | static <A> ItIt<A> countIterator_exclusive_backwards(int a, int b, IF1<Int, A> f) {
|
11 | ret mapI_if1(f, countIterator_exclusive_backwards(a, b)); |
12 | } |
Began life as a copy of #1018109
download show line numbers debug dex old transpilations
Travelled to 7 computer(s): bhatertpkbcr, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, vouqrxazstgt, xrpafgyirdlv
No comments. add comment
| Snippet ID: | #1029194 |
| Snippet name: | countIterator_exclusive_backwards - count from a to b (exclusively) |
| Eternal ID of this version: | #1029194/4 |
| Text MD5: | 4245da4c484e4c20a9032aa6bb8d4c2b |
| Transpilation MD5: | 410d73c319ea2cb46b2fbc611bccc80e |
| Author: | stefan |
| Category: | javax |
| Type: | JavaX fragment (include) |
| Public (visible to everyone): | Yes |
| Archived (hidden from active list): | No |
| Created/modified: | 2020-07-30 00:33:22 |
| Source code size: | 351 bytes / 12 lines |
| Pitched / IR pitched: | No / No |
| Views / Downloads: | 432 / 572 |
| Version history: | 3 change(s) |
| Referenced in: | [show references] |