1 | static long intSumAsLong_positiveOnly(Iterable<Int> l) { |
2 | long sum = 0; |
3 | for (Int i : unnull(l)) |
4 | if (i != null && i > 0) sum += i; |
5 | ret sum; |
6 | } |
Began life as a copy of #1018930
download show line numbers debug dex old transpilations
Travelled to 12 computer(s): bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, irmadwmeruwu, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, vouqrxazstgt
No comments. add comment
Snippet ID: | #1019290 |
Snippet name: | intSumAsLong_positiveOnly |
Eternal ID of this version: | #1019290/1 |
Text MD5: | 5f65ad5b6cf05375d553100063be4ac1 |
Author: | stefan |
Category: | javax |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2018-10-29 16:17:34 |
Source code size: | 154 bytes / 6 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 347 / 378 |
Referenced in: | [show references] |