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

6
LINES

< > BotCompany Repo | #1019407 // singlePlusArray

JavaX fragment (include)

static <A> A[] singlePlusArray(A a, A[] l) {
  A[] out = newObjectArrayOfSameType(l, l(l)+1);
  out[0] = a;
  arraycopy(l, 0, out, 1, l(l));
  ret out;
}

Author comment

Began life as a copy of #1019126

download  show line numbers  debug dex  old transpilations   

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

No comments. add comment

Snippet ID: #1019407
Snippet name: singlePlusArray
Eternal ID of this version: #1019407/3
Text MD5: b89ce686d513bdcdd895925de5b57667
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2018-11-05 00:54:35
Source code size: 158 bytes / 6 lines
Pitched / IR pitched: No / No
Views / Downloads: 312 / 363
Version history: 2 change(s)
Referenced in: #1006654 - Standard functions list 2 (LIVE, continuation of #761)
#1019410 - singlePlusArrayPlus
#1024620 - itemPlusObjectArray