Libraryless. Click here for Pure Java version (54L/1K).
static <A> A[] repF_array(int n, IF0<A> f) { A[] a = cast new O[n]; for i to n: a[i] = f.get(); ret a; } static <A> A[] nuLike repF_array(Class<A> type, int n, IF0<A> f) { A[] a = newArrayOfType(type, n); for i to n: a[i] = f.get(); ret a; }
Began life as a copy of #1025074
download show line numbers debug dex old transpilations
Travelled to 4 computer(s): bhatertpkbcr, mqqgnosmbjvj, pyentgdyhuwx, vouqrxazstgt
No comments. add comment
Snippet ID: | #1030532 |
Snippet name: | repF_array - call a function repeatedly, collect as object array |
Eternal ID of this version: | #1030532/5 |
Text MD5: | b36159bb670e91588ebb3d97b53935da |
Transpilation MD5: | 6ec12a406a6ada6f53007f40ac65ac60 |
Author: | stefan |
Category: | javax |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2021-01-06 17:10:02 |
Source code size: | 274 bytes / 13 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 205 / 301 |
Version history: | 4 change(s) |
Referenced in: | [show references] |