Transpiled version (2628L) is out of date.
static IntRange intersectIntRanges(IntRange a, IntRange b) { int start = max(a.start, b.start); int end = min(a.end, b.end); ret start <= end ? IntRange(start, end) : null; } static L<IntRange> intersectIntRanges(Iterable<IntRange> l, IntRange b) { ret map(l, r -> intersectIntRanges(r, b)); }
Began life as a copy of #1028623
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: | #1029482 |
Snippet name: | intersectIntRanges |
Eternal ID of this version: | #1029482/4 |
Text MD5: | 81b7a1cfe4c040ecb92a266432adfa4d |
Author: | stefan |
Category: | javax |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2022-03-30 00:59:23 |
Source code size: | 310 bytes / 9 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 255 / 318 |
Version history: | 3 change(s) |
Referenced in: | [show references] |