Libraryless. Click here for Pure Java version (2097L/13K).
1 | static ItIt mapLike multiCall(O f, O... args) {
|
2 | int n = l(args); |
3 | Iterable<O>[] lists = new Iterable[n]; |
4 | for i to n: {
|
5 | O arg = args[i]; |
6 | if (arg cast Multi) |
7 | lists[i] = arg.arguments; |
8 | else |
9 | lists[i] = ll(arg); |
10 | } |
11 | ret mapI(outerProduct_arrays(lists), args2 -> callF(f, args2)); |
12 | } |
download show line numbers debug dex old transpilations
Travelled to 6 computer(s): bhatertpkbcr, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, vouqrxazstgt
No comments. add comment
| Snippet ID: | #1023782 |
| Snippet name: | multiCall - call a function with all combinations of Multi(...) arguments |
| Eternal ID of this version: | #1023782/12 |
| Text MD5: | b30267365a490a2edfe6db23c74c339c |
| Transpilation MD5: | 2285118d18a0fa2a4f7096e4e2cec482 |
| Author: | stefan |
| Category: | javax / a.i. |
| Type: | JavaX fragment (include) |
| Public (visible to everyone): | Yes |
| Archived (hidden from active list): | No |
| Created/modified: | 2019-07-09 03:43:57 |
| Source code size: | 318 bytes / 12 lines |
| Pitched / IR pitched: | No / No |
| Views / Downloads: | 457 / 596 |
| Version history: | 11 change(s) |
| Referenced in: | [show references] |