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

8
LINES

< > BotCompany Repo | #1017426 // flattenListOfPairs

JavaX fragment (include)

static <A> L<A> flattenListOfPairs(L<Pair<A>> l) {
  L<A> out = emptyList(l(l)*2);
  for (Pair<A> p : unnull(l)) {
    out.add(p.a);
    out.add(p.b);
  }
  ret out;
}

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