Libraryless. Click here for Pure Java version (2421L/15K).
1 | static <A, B> ItIt<Pair<A, B>> outerProductPairs(Collection<A> lA, Collection<B> lB) {
|
2 | ret nestedIterator(lA, func(A a) -> Iterator<Pair<A, B>> {
|
3 | mapI(lB, b -> pair(a, b)) |
4 | }); |
5 | } |
6 | |
7 | static <A> ItIt<Pair<A>> outerProductPairs(Collection<A> lA) {
|
8 | ret outerProductPairs(lA, lA); |
9 | } |
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: | #1023750 |
| Snippet name: | outerProductPairs |
| Eternal ID of this version: | #1023750/3 |
| Text MD5: | cc018179d440090957cccbbc01fd98ef |
| Transpilation MD5: | f1c428d69bd4958dbd7ac091ce521c39 |
| Author: | stefan |
| Category: | javax |
| Type: | JavaX fragment (include) |
| Public (visible to everyone): | Yes |
| Archived (hidden from active list): | No |
| Created/modified: | 2019-11-27 13:45:03 |
| Source code size: | 292 bytes / 9 lines |
| Pitched / IR pitched: | No / No |
| Views / Downloads: | 456 / 614 |
| Version history: | 2 change(s) |
| Referenced in: | [show references] |