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

5
LINES

< > BotCompany Repo | #1006328 // replaceNthItem

JavaX fragment (include)

static <A> L<A> replaceNthItem(L<A> l, int idx, A a) {
  l = cloneList(l);
  if (idx < l(l)) l.set(idx, a);
  ret l;
}

download  show line numbers  debug dex  old transpilations   

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

No comments. add comment

Snippet ID: #1006328
Snippet name: replaceNthItem
Eternal ID of this version: #1006328/1
Text MD5: d22ef887a13d37a33c114a6c2350e92e
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2016-12-28 21:24:03
Source code size: 122 bytes / 5 lines
Pitched / IR pitched: No / No
Views / Downloads: 426 / 446
Referenced in: [show references]