Libraryless. Click here for Pure Java version (4653L/26K).
1 | // f must return a list |
2 | static L concatMap(O f, Iterable l) { |
3 | ret concatLists(map(f, l)); |
4 | } |
5 | |
6 | static L concatMap(Iterable l, O f) { |
7 | ret concatMap(f, l); |
8 | } |
9 | |
10 | static L concatMap(O f, O[] l) { |
11 | ret concatLists(map(f, l)); |
12 | } |
13 | |
14 | static L concatMap(O[] l, O f) { |
15 | ret concatMap(f, l); |
16 | } |
17 | |
18 | static <A, B, C extends Iterable<B>> L<B> concatMap(Iterable<A> l, IF1<A, C> f) { |
19 | ret concatMap(l, (O) f); |
20 | } |
21 | |
22 | static <A, B, C extends Iterable<B>> L<B> lambdaMapLike concatMap(IF1<A, C> f, Iterable<A> l) { |
23 | ret concatMap(l, f); |
24 | } |
25 | |
26 | static <A, B, C extends Iterable<B>> L<B> lambdaMapLike concatMap(IF1<A, C> f, A[] l) { |
27 | ret concatMap((O) f, l); |
28 | } |
download show line numbers debug dex old transpilations
Travelled to 15 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, ddnzoavkxhuk, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt, xrpafgyirdlv
No comments. add comment
Snippet ID: | #1005492 |
Snippet name: | concatMap - map, then concat lists |
Eternal ID of this version: | #1005492/9 |
Text MD5: | abe4a1216524fd3cf0aca9e2442580b9 |
Transpilation MD5: | 70e769e337a0f1215a0af1fd138f4418 |
Author: | stefan |
Category: | javax |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2021-11-14 23:02:32 |
Source code size: | 661 bytes / 28 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 736 / 795 |
Version history: | 8 change(s) |
Referenced in: | [show references] |