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

10
LINES

< > BotCompany Repo | #1024344 // longSum

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

Transpiled version (3892L) is out of date.

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

static <A> long lambdaMapLike longSum(IF1<A, Long> f, Iterable<A> l) {
  ret longSum(mapI(f, l));
}

Author comment

Began life as a copy of #1018930

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: #1024344
Snippet name: longSum
Eternal ID of this version: #1024344/4
Text MD5: 4a6677769b71816e0f3aae77163d7867
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2021-09-29 21:01:00
Source code size: 234 bytes / 10 lines
Pitched / IR pitched: No / No
Views / Downloads: 174 / 228
Version history: 3 change(s)
Referenced in: #1006654 - Standard functions list 2 (LIVE, continuation of #761)