Libraryless. Click here for Pure Java version (41L/1K).
1 | static <A> Set<A> lambdaMapLike repFToSet(IF0<A> f, int n) {
|
2 | new Set<A> set; |
3 | repeat n {
|
4 | set.add(f!); |
5 | } |
6 | ret set; |
7 | } |
8 | |
9 | static <A> Set<A> repFToSet(int n, IF0<A> f) {
|
10 | ret repFToSet(f, n); |
11 | } |
Began life as a copy of #1007438
download show line numbers debug dex old transpilations
Travelled to 3 computer(s): bhatertpkbcr, mqqgnosmbjvj, pyentgdyhuwx
No comments. add comment
| Snippet ID: | #1032238 |
| Snippet name: | repFToSet - call a function repeatedly, collect into set |
| Eternal ID of this version: | #1032238/3 |
| Text MD5: | 6026e513e7f8105ba5bc7c6ceb833979 |
| Transpilation MD5: | 78b469619351583c49fd5886cc8a8a28 |
| Author: | stefan |
| Category: | javax |
| Type: | JavaX fragment (include) |
| Public (visible to everyone): | Yes |
| Archived (hidden from active list): | No |
| Created/modified: | 2021-08-21 03:51:00 |
| Source code size: | 208 bytes / 11 lines |
| Pitched / IR pitched: | No / No |
| Views / Downloads: | 432 / 571 |
| Version history: | 2 change(s) |
| Referenced in: | [show references] |