static <A, B extends Iterable<A>> ItIt<L<A>> outerProduct(L<B> lists) { if (empty(lists)) ret singletonIterator(new L); L<B> lists2 = dropFirst(lists); ret nestedIterator(first(lists), func(A a) -> Iterator<L<A>> { mapI(outerProduct(lists2), l -> itemPlusList(a, l)) }); }
Began life as a copy of #1023780
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: | #1023795 |
Snippet name: | outerProduct [old] |
Eternal ID of this version: | #1023795/1 |
Text MD5: | e8b68f11cdca55c2e252a75b8c34134e |
Author: | stefan |
Category: | javax |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2019-07-09 03:29:01 |
Source code size: | 290 bytes / 7 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 178 / 204 |
Referenced in: | -