Libraryless. Click here for Pure Java version (3036L/19K).
1 | static <A, B> ItIt<Map<A, B>> allPartialMappings(Cl<A> l1, Cl<B> l2) { |
2 | L<A> _l1 = asList(l1); |
3 | L<B> _l2 = asList(l2); |
4 | ret (ItIt) nestedI(allSubsetsOfLength(l(l1), _l2), subset -> |
5 | mapI(allPermutations(subset), perm -> zipTwoListsToOrderedMap(_l1, perm))); |
6 | } |
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: | #1028745 |
Snippet name: | allPartialMappings - use all elements of first list, but not necessarily all elements of second list |
Eternal ID of this version: | #1028745/8 |
Text MD5: | 14b6a3030f5f23701235b5759ac6406d |
Transpilation MD5: | 3680062482f5e54bf24a9540a6de3fe0 |
Author: | stefan |
Category: | javax / nla |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2020-07-10 14:45:09 |
Source code size: | 270 bytes / 6 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 228 / 338 |
Version history: | 7 change(s) |
Referenced in: | [show references] |