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

6
LINES

< > BotCompany Repo | #1019290 // intSumAsLong_positiveOnly

JavaX fragment (include)

static long intSumAsLong_positiveOnly(Iterable<Int> l) {
  long sum = 0;
  for (Int i : unnull(l))
    if (i != null && i > 0) sum += i;
  ret sum;
}

Author comment

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: 346 / 377
Referenced in: [show references]