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

8
LINES

< > BotCompany Repo | #1002099 // cppCopy

JavaX fragment (include)

static <A> void cppCopy(Collection<A> a, List<A> b) {
  ListIterator<A> it = b.listIterator();
  for (A x : a) {
    if (!it.hasNext()) fail("unexpected end of collection");
    it.next();
    it.set(x);
  }
}

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: #1002099
Snippet name: cppCopy
Eternal ID of this version: #1002099/1
Text MD5: 1c34edc7219918c4def31d8d988140e3
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2015-12-18 17:11:55
Source code size: 216 bytes / 8 lines
Pitched / IR pitched: No / Yes
Views / Downloads: 622 / 857
Referenced in: [show references]