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


< > BotCompany Repo | #1007438 - repF - call a function repeatedly, collect into list

JavaX fragment (include)

static L repF(int n, O f, O... args) {
  new L l;
  for i to n:
    l.add(callF(f, args));
  ret l;

static L mapLike repF(O f, int n) {
  ret repF(n, f);

static <A> L<A> repF(int n, IF0<A> f) {
  ret repF(f, n);

Author comment

Began life as a copy of #1002635

download  show line numbers  debug dex  old transpilations   

Travelled to 15 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mowyntqkapby, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt, xrpafgyirdlv

No comments. add comment

Snippet ID: #1007438
Snippet name: repF - call a function repeatedly, collect into list
Eternal ID of this version: #1007438/8
Text MD5: f24dd41db6c1d69d6c5ab8f0fbaacece
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2021-06-11 16:02:40
Source code size: 232 bytes / 14 lines
Pitched / IR pitched: No / No
Views / Downloads: 375 / 409
Version history: 7 change(s)
Referenced in: [show references]