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

8
LINES

< > BotCompany Repo | #1017426 // flattenListOfPairs

JavaX fragment (include)

1  
static <A> L<A> flattenListOfPairs(L<Pair<A>> l) {
2  
  L<A> out = emptyList(l(l)*2);
3  
  for (Pair<A> p : unnull(l)) {
4  
    out.add(p.a);
5  
    out.add(p.b);
6  
  }
7  
  ret out;
8  
}

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: #1017426
Snippet name: flattenListOfPairs
Eternal ID of this version: #1017426/1
Text MD5: d7128df0f734f0b38bf1d53326510749
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2018-07-20 14:46:47
Source code size: 174 bytes / 8 lines
Pitched / IR pitched: No / No
Views / Downloads: 362 / 399
Referenced in: [show references]