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

7
LINES

< > BotCompany Repo | #1026174 // multiSetMapToPairs

JavaX fragment (include)

1  
static <A, B> LPair<A, B> multiSetMapToPairs(MultiSetMap<A, B> mm) {
2  
  LPair<A, B> out = new L;
3  
  for (A key : keys(mm))
4  
    for (B value : mm.get(key))
5  
      out.add(pair(key, value));
6  
  ret out;
7  
}

Author comment

Began life as a copy of #1020210

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: #1026174
Snippet name: multiSetMapToPairs
Eternal ID of this version: #1026174/1
Text MD5: 3e2879f6d74ca87371359682b26c69c8
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2019-11-27 19:07:22
Source code size: 204 bytes / 7 lines
Pitched / IR pitched: No / No
Views / Downloads: 163 / 208
Referenced in: [show references]