Libraryless. Click here for Pure Java version (9155L/50K).
1 | srecord noeq ListFromFunction<A>(int n, IF1<Int, A> f) extends RandomAccessAbstractList<A> { |
2 | public int size() { ret n; } |
3 | public A get(int i) { ret f.get(i); } |
4 | } |
5 | |
6 | static <A> L<A> listFromFunction(int n, IF1<Int, A> f) { |
7 | ret new ListFromFunction<A>(n, f); |
8 | } |
9 | |
10 | static <A> L<A> lambdaMapLike listFromFunction(IF1<Int, A> f, int n) { |
11 | ret new ListFromFunction<A>(n, f); |
12 | } |
Began life as a copy of #1029040
download show line numbers debug dex old transpilations
Travelled to 9 computer(s): bhatertpkbcr, ekrmjmnbrukm, mowyntqkapby, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, vouqrxazstgt, xrpafgyirdlv
No comments. add comment
Snippet ID: | #1029070 |
Snippet name: | listFromFunction |
Eternal ID of this version: | #1029070/5 |
Text MD5: | 429bf407cf21d810d6bd02a0ba44ac15 |
Transpilation MD5: | 962d31bbbf33cd24f7b89e7af78c1cc0 |
Author: | stefan |
Category: | javax |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2022-05-30 17:47:13 |
Source code size: | 384 bytes / 12 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 268 / 410 |
Version history: | 4 change(s) |
Referenced in: | [show references] |