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

20
LINES

< > BotCompany Repo | #1016515 // foldl

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

Libraryless. Click here for Pure Java version (1752L/11K).

static <A, B> A mapLike foldl(F2<A, B, A> f, A seed, Iterable<B> l) {
  A a = seed;
  if (l != null) for(B b : l)
    a = callF(f, a, b);
  ret a;
}

static <A, B> A mapLike foldl(F2<A, B, A> f, A seed, B[] l) {
  A a = seed;
  if (l != null) for(B b : l)
    a = callF(f, a, b);
  ret a;
}

static <A, B> A mapLike foldl(O f, A seed, B[] l) {
  A a = seed;
  if (l != null) for(B b : l)
    a = (A) callF(f, a, b);
  ret a;
}

download  show line numbers  debug dex  old transpilations   

Travelled to 14 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, irmadwmeruwu, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt

No comments. add comment

Snippet ID: #1016515
Snippet name: foldl
Eternal ID of this version: #1016515/5
Text MD5: 031715cdbea6e0f1e40d4255cbc21dc1
Transpilation MD5: 2deefaca254ca9ebe67b5d00f5dee395
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2019-08-18 00:12:58
Source code size: 445 bytes / 20 lines
Pitched / IR pitched: No / No
Views / Downloads: 406 / 519
Version history: 4 change(s)
Referenced in: [show references]