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

10
LINES

< > BotCompany Repo | #1011514 // repArrayF - call a function repeatedly, collect into array

JavaX fragment (include)

static O[] repArrayF(int n, O f, O... args) {
  O[] o = new O[n];
  for i to n:
    o[i] = callF(f, args);
  ret o;
}

static O[] repArrayF(O f, int n) {
  ret repArrayF(n, f);
}

Author comment

Began life as a copy of #1007438

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: #1011514
Snippet name: repArrayF - call a function repeatedly, collect into array
Eternal ID of this version: #1011514/3
Text MD5: c54125cba09fa5129e7d44d76615787f
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2017-10-30 22:19:37
Source code size: 187 bytes / 10 lines
Pitched / IR pitched: No / No
Views / Downloads: 405 / 408
Version history: 2 change(s)
Referenced in: #1006654 - Standard functions list 2 (LIVE, continuation of #761)