Not logged in.  Login/Logout/Register | List snippets | | Create snippet | Upload image | Upload data

7
LINES

< > BotCompany Repo | #1025106 // intRangeLengths

JavaX fragment (include) [tags: use-pretranspiled]

Libraryless. Click here for Pure Java version (2918L/17K).

1  
static int[] intRangeLengths(Cl<IntRange> l) {
2  
  int n = l(l);
3  
  int[] a = new int[n];
4  
  Iterator<IntRange> it = iterator(l);
5  
  for i to n: a[i] = it.next().length();
6  
  ret a;
7  
}

Author comment

Began life as a copy of #1010187

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: #1025106
Snippet name: intRangeLengths
Eternal ID of this version: #1025106/3
Text MD5: 6429f3a9b5a04848e1e091932caf1da1
Transpilation MD5: ce45166812775881a330d46668fdd6c2
Author: stefan
Category: javax / maths
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2021-06-25 10:54:41
Source code size: 183 bytes / 7 lines
Pitched / IR pitched: No / No
Views / Downloads: 298 / 378
Version history: 2 change(s)
Referenced in: [show references]