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

9
LINES

< > BotCompany Repo | #1004447 // flattenList

JavaX fragment (include)

static L flattenList(L a) {
  new L l;
  for (O x : a)
    if (x instanceof L)
      l.addAll(flattenList((L) x));
    else
      l.add(x);
  ret l;
}

Author comment

Began life as a copy of #1003769

download  show line numbers  debug dex  old transpilations   

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

No comments. add comment

Snippet ID: #1004447
Snippet name: flattenList
Eternal ID of this version: #1004447/1
Text MD5: af82ad56f96502127c6e7507181874bb
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2016-08-17 16:37:04
Source code size: 158 bytes / 9 lines
Pitched / IR pitched: No / No
Views / Downloads: 587 / 581
Referenced in: [show references]