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

11
LINES

< > BotCompany Repo | #1011504 // smallestList_ll

JavaX fragment (include)

1  
static O smallestList_ll(O... e) {
2  
  int n = l(e);
3  
  smallestList_checkElements(e);
4  
  switch (n) {
5  
    case 0: ret null;
6  
    case 1: ret e[0];
7  
    case 2: ret pair(e[0], e[1]);
8  
    case 3: ret triple(e[0], e[1], e[2]);
9  
    default: ret cloneObjectArray(e);
10  
  }
11  
}

download  show line numbers  debug dex  old transpilations   

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

No comments. add comment

Snippet ID: #1011504
Snippet name: smallestList_ll
Eternal ID of this version: #1011504/6
Text MD5: 920a6e5a058ec4b2cdcb5329d4a9151a
Author: stefan
Category: javax / collections
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2017-11-02 03:30:08
Source code size: 272 bytes / 11 lines
Pitched / IR pitched: No / No
Views / Downloads: 403 / 437
Version history: 5 change(s)
Referenced in: [show references]