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.

1  
static O[] lambdaMapLike mapObjectArray(IF1 f, O[] l) {
2  
  if (empty(l)) ret l;
3  
  int n = l.length;
4  
  O[] a2 = new[n];
5  
  for i to n:
6  
    a2[i] = f.get(l[i]);
7  
  ret a2;
8  
}

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: 172 / 265
Version history: 4 change(s)
Referenced in: [show references]