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

7
LINES

< > BotCompany Repo | #1036265 // intDeltas

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

Libraryless. Click here for Pure Java version (114L/1K).

1  
static L<Int> intDeltas(L<Int> l) {
2  
  int n = l(l);
3  
  new L<Int> deltas;
4  
  for (int i = 0; i < n-1; i++)
5  
    deltas.add(l.get(i+1)-l.get(i));
6  
  ret deltas;
7  
}

download  show line numbers  debug dex  old transpilations   

Travelled to 2 computer(s): mqqgnosmbjvj, wnsclhtenguj

No comments. add comment

Snippet ID: #1036265
Snippet name: intDeltas
Eternal ID of this version: #1036265/1
Text MD5: 9d3284a0958b0e59d41d352860686606
Transpilation MD5: 8287d1b1311e5d0f924284c3fac128b9
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2022-11-06 15:56:27
Source code size: 163 bytes / 7 lines
Pitched / IR pitched: No / No
Views / Downloads: 125 / 180
Referenced in: [show references]