Transpiled version (7886L) is out of date.
1 | static L repF(int n, O f, O... args) {
|
2 | L l = emptyList(n); |
3 | for i to n: |
4 | l.add(callF(f, args)); |
5 | ret l; |
6 | } |
7 | |
8 | static L repF(O f, int n) {
|
9 | ret repF(n, f); |
10 | } |
11 | |
12 | static <A> L<A> lambdaMapLike repF(int n, IF0<A> f) {
|
13 | L<A> l = emptyList(n); |
14 | for i to n: |
15 | l.add(f.get()); |
16 | ret l; |
17 | } |
18 | |
19 | static <A> L<A> repF(IF0<A> f, int n) {
|
20 | ret repF(n, f); |
21 | } |
Began life as a copy of #1002635
download show line numbers debug dex old transpilations
Travelled to 16 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mowyntqkapby, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt, wnsclhtenguj, xrpafgyirdlv
No comments. add comment
| Snippet ID: | #1007438 |
| Snippet name: | repF - call a function repeatedly, collect into list |
| Eternal ID of this version: | #1007438/13 |
| Text MD5: | 84920c80bcdae5fffb5ea9d0a5e2f750 |
| Author: | stefan |
| Category: | javax |
| Type: | JavaX fragment (include) |
| Public (visible to everyone): | Yes |
| Archived (hidden from active list): | No |
| Created/modified: | 2022-04-15 00:42:00 |
| Source code size: | 367 bytes / 21 lines |
| Pitched / IR pitched: | No / No |
| Views / Downloads: | 1266 / 1564 |
| Version history: | 12 change(s) |
| Referenced in: | [show references] |