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

20
LINES

< > BotCompany Repo | #1016467 // mapPairsToList

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

Libraryless. Click here for Pure Java version (2154L/14K).

1  
static <A, B, C> L<C> mapPairsToList(Iterable<Pair<A, B>> l, F2<A, B, C> f) {
2  
  L<C> x = emptyList(l);
3  
  if (l != null) for (Pair<A, B> p : l)
4  
    x.add(callF(f, p.a, p.b));
5  
  ret x;
6  
}
7  
8  
static <A, B, C> L<C> mapPairsToList(Iterable<Pair<A, B>> l, IF2<A, B, C> f) {
9  
  L<C> x = emptyList(l);
10  
  if (l != null) for (Pair<A, B> p : l)
11  
    x.add(f.get(p.a, p.b));
12  
  ret x;
13  
}
14  
15  
static <A, B> L mapLike mapPairsToList(O f, Iterable<Pair<A, B>> l) {
16  
  L x = emptyList(l);
17  
  if (l != null) for (Pair<A, B> p : l)
18  
    x.add(callF(f, p.a, p.b));
19  
  ret x;
20  
}

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: #1016467
Snippet name: mapPairsToList
Eternal ID of this version: #1016467/3
Text MD5: 1219f560e7e6657bdab4081627301086
Transpilation MD5: ffef5acc5fe9081f657068b903b65a54
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2019-11-11 13:35:24
Source code size: 562 bytes / 20 lines
Pitched / IR pitched: No / No
Views / Downloads: 337 / 420
Version history: 2 change(s)
Referenced in: [show references]