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

6
LINES

< > BotCompany Repo | #1030015 // zipTwoListsToPairs_lengthOfFirst

JavaX fragment (include) [tags: use-pretranspiled]

Libraryless. Click here for Pure Java version (2509L/16K).

static <A, B> LPair<A, B> zipTwoListsToPairs_lengthOfFirst(L<A> l1, L<B> l2) {
  int n = l(l1);
  LPair<A, B> out = emptyList(n);
  for i to n: addPair(out, l1.get(i), get(l2, i));
  ret out;
}

Author comment

Began life as a copy of #1017453

download  show line numbers  debug dex  old transpilations   

Travelled to 4 computer(s): bhatertpkbcr, mqqgnosmbjvj, pyentgdyhuwx, vouqrxazstgt

No comments. add comment

Snippet ID: #1030015
Snippet name: zipTwoListsToPairs_lengthOfFirst
Eternal ID of this version: #1030015/3
Text MD5: 11b8f969f4486e06b390a9d8238cd79f
Transpilation MD5: 37e0361d45710a2da53921e70f22e6d7
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2020-10-29 14:18:43
Source code size: 198 bytes / 6 lines
Pitched / IR pitched: No / No
Views / Downloads: 316 / 462
Version history: 2 change(s)
Referenced in: [show references]