1 | static L<Int> intRangeList(int b) { |
2 | ret intRangeList(0, b); |
3 | } |
4 | |
5 | static L<Int> intRangeList(final int a, final int b) { |
6 | final int l = max(0, b-a); |
7 | ret RandomAccessAbstractList<Int>() { |
8 | public int size() { ret l; } |
9 | public Int get(int i) { ret i >= 0 && i < l ? a+i : null; } |
10 | }; |
11 | } |
Began life as a copy of #1019750
download show line numbers debug dex old transpilations
Travelled to 10 computer(s): bhatertpkbcr, cfunsshuasjs, gwrvuhgaqvyk, irmadwmeruwu, ishqpsrjomds, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, vouqrxazstgt
No comments. add comment
Snippet ID: | #1019752 |
Snippet name: | intRangeList - from a to b-1 |
Eternal ID of this version: | #1019752/5 |
Text MD5: | a3c33db2a03032436ede76d0c54b227c |
Author: | stefan |
Category: | javax |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2018-12-31 01:17:42 |
Source code size: | 302 bytes / 11 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 285 / 356 |
Version history: | 4 change(s) |
Referenced in: | [show references] |