Libraryless. Click here for Pure Java version (2456L/16K).
1 | static L lambdaMapLike mapValuesToList(O func, Map map) { |
2 | L out = emptyList(l(map)); |
3 | for (O key : keys(map)) |
4 | out.add(callF(func, map.get(key))); |
5 | ret out; |
6 | } |
7 | |
8 | static <A, B, C> L<C> mapValuesToList(IF1<B, C> f, Map<A, B> map) { |
9 | ret mapValuesToList((O) f, map); |
10 | } |
11 | |
12 | static <A, B, C> L<C> mapValuesToList(Map<A, B> map, IF1<B, C> f) { |
13 | ret mapValuesToList(f, map); |
14 | } |
15 | |
16 | static L mapValuesToList(Map map, O func) { |
17 | ret mapValuesToList(func, map); |
18 | } |
Began life as a copy of #1004652
download show line numbers debug dex old transpilations
Travelled to 7 computer(s): bhatertpkbcr, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, vouqrxazstgt, xrpafgyirdlv
No comments. add comment
Snippet ID: | #1025495 |
Snippet name: | mapValuesToList |
Eternal ID of this version: | #1025495/5 |
Text MD5: | 7823edefe53c0b1b114a2d8ac2c6ab9c |
Transpilation MD5: | 97719b041a4406c2ad51416262755697 |
Author: | stefan |
Category: | javax |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2020-07-18 18:42:10 |
Source code size: | 471 bytes / 18 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 357 / 461 |
Version history: | 4 change(s) |
Referenced in: | [show references] |