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

4
LINES

< > BotCompany Repo | #1003338 // replaceLastElement

JavaX fragment (include)

static <A> void replaceLastElement(L<A> l, A a) {
  if (nempty(l))
    l.set(l(l)-1, a);
}

download  show line numbers  debug dex  old transpilations   

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

No comments. add comment

Snippet ID: #1003338
Snippet name: replaceLastElement
Eternal ID of this version: #1003338/1
Text MD5: c8a27797c71ca9123b3d46a44c4a463f
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2016-06-19 19:48:04
Source code size: 93 bytes / 4 lines
Pitched / IR pitched: No / No
Views / Downloads: 484 / 1083
Referenced in: [show references]