Libraryless. Click here for Pure Java version (2925L/17K).
1 | static L<IntRange> intArrayToIntRanges_startAndLength(int[] array) { |
2 | int n = l(array)/2; |
3 | L<IntRange> out = emptyList(n); |
4 | for i to n: |
5 | out.add(intRangeWithLength(array[i*2], array[i*2+1])); |
6 | ret out; |
7 | } |
Began life as a copy of #1031649
download show line numbers debug dex old transpilations
Travelled to 4 computer(s): bhatertpkbcr, mqqgnosmbjvj, pyentgdyhuwx, vouqrxazstgt
No comments. add comment
Snippet ID: | #1031650 |
Snippet name: | intArrayToIntRanges_startAndLength |
Eternal ID of this version: | #1031650/3 |
Text MD5: | 3d4fa19be5051dad3610bb2a5129a871 |
Transpilation MD5: | 01ef25be366da1ac449e049c7945a138 |
Author: | stefan |
Category: | javax |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2021-06-25 03:17:30 |
Source code size: | 216 bytes / 7 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 176 / 254 |
Version history: | 2 change(s) |
Referenced in: | [show references] |