Not logged in.  Login/Logout/Register | List snippets | | Create snippet | Upload image | Upload data

9
LINES

< > BotCompany Repo | #1023750 // outerProductPairs

JavaX fragment (include) [tags: use-pretranspiled]

Libraryless. Click here for Pure Java version (2421L/15K).

static <A, B> ItIt<Pair<A, B>> outerProductPairs(Collection<A> lA, Collection<B> lB) {
  ret nestedIterator(lA, func(A a) -> Iterator<Pair<A, B>> {
    mapI(lB, b -> pair(a, b))
  });
}

static <A> ItIt<Pair<A>> outerProductPairs(Collection<A> lA) {
  ret outerProductPairs(lA, lA);
}

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: 227 / 334
Version history: 2 change(s)
Referenced in: [show references]