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

7
LINES

< > BotCompany Repo | #1011524 // smallestList_asList - treat the result as immutable!

JavaX fragment (include)

1  
static L smallestList_asList(O l) {
2  
  if (l == null) ret ll();
3  
  if (l cast Pair) ret ll(l.a, l.b);
4  
  if (l cast T3) ret ll(l.a, l.b, l.c);
5  
  if (l cast O[]) ret Arrays.asList(l);
6  
  ret ll(l);
7  
}

Author comment

Began life as a copy of #1011511

download  show line numbers  debug dex  old transpilations   

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

No comments. add comment

Snippet ID: #1011524
Snippet name: smallestList_asList - treat the result as immutable!
Eternal ID of this version: #1011524/4
Text MD5: c5400812099c019534d6148525b24820
Author: stefan
Category: javax / collections
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2020-07-27 00:01:56
Source code size: 200 bytes / 7 lines
Pitched / IR pitched: No / No
Views / Downloads: 439 / 473
Version history: 3 change(s)
Referenced in: [show references]