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

8
LINES

< > BotCompany Repo | #1027893 // mapObjectArray - map over object array (to new object array)

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

Transpiled version (2483L) is out of date.

static O[] lambdaMapLike mapObjectArray(IF1 f, O[] l) {
  if (empty(l)) ret l;
  int n = l.length;
  O[] a2 = new[n];
  for i to n:
    a2[i] = f.get(l[i]);
  ret a2;
}

download  show line numbers  debug dex  old transpilations   

Travelled to 7 computer(s): bhatertpkbcr, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, vouqrxazstgt, xrpafgyirdlv

No comments. add comment

Snippet ID: #1027893
Snippet name: mapObjectArray - map over object array (to new object array)
Eternal ID of this version: #1027893/5
Text MD5: 6419464574aa29c6e96dd0570a4fb1c2
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2020-04-18 11:18:38
Source code size: 175 bytes / 8 lines
Pitched / IR pitched: No / No
Views / Downloads: 164 / 255
Version history: 4 change(s)
Referenced in: [show references]