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

14
LINES

< > 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   

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

No comments. add comment

Snippet ID: #1007438
Snippet name: repF - call a function repeatedly, collect into list
Eternal ID of this version: #1007438/6
Text MD5: f24dd41db6c1d69d6c5ab8f0fbaacece
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2019-08-26 21:50:54
Source code size: 232 bytes / 14 lines
Pitched / IR pitched: No / No
Views / Downloads: 299 / 324
Version history: 5 change(s)
Referenced in: [show references]

Formerly at http://tinybrain.de/1007438 & http://1007438.tinybrain.de