Libraryless. Click here for Pure Java version (4897L/27K).
static L<Int> partialSums_firstIs0(L<Int> l) { int n = l(l); IntBuffer out = new(n); int sum = 0; for i to n: { out.add(sum); sum += l.get(i); } out.add(sum); ret out.asVirtualList(); }
download show line numbers debug dex old transpilations
Travelled to 3 computer(s): bhatertpkbcr, ekrmjmnbrukm, mqqgnosmbjvj
No comments. add comment
| Snippet ID: | #1033386 |
| Snippet name: | partialSums_firstIs0 |
| Eternal ID of this version: | #1033386/3 |
| Text MD5: | abc38c1c1ff81f9f2d48561c0cdd0905 |
| Transpilation MD5: | 44e7001c777af3f7e136acf05557b2f2 |
| Author: | stefan |
| Category: | javax / maths |
| Type: | JavaX fragment (include) |
| Public (visible to everyone): | Yes |
| Archived (hidden from active list): | No |
| Created/modified: | 2021-10-27 01:27:53 |
| Source code size: | 217 bytes / 11 lines |
| Pitched / IR pitched: | No / No |
| Views / Downloads: | 398 / 529 |
| Version history: | 2 change(s) |
| Referenced in: | [show references] |