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

6
LINES

< > BotCompany Repo | #1030109 // multiSetToPairs

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

Libraryless. Click here for Pure Java version (2997L/18K).

1  
static <A> LPair<A, Int> multiSetToPairs(MultiSet<A> ms) {
2  
  new LPair<A, Int> l;
3  
  for (A a : keys(ms))
4  
    l.add(pair(a, ms.get(a)));
5  
  ret l;
6  
}

Author comment

Began life as a copy of #1013507

download  show line numbers  debug dex  old transpilations   

Travelled to 4 computer(s): bhatertpkbcr, mqqgnosmbjvj, pyentgdyhuwx, vouqrxazstgt

No comments. add comment

Snippet ID: #1030109
Snippet name: multiSetToPairs
Eternal ID of this version: #1030109/1
Text MD5: 5d7b7fb025cb9b35d4eb995964e501d0
Transpilation MD5: b1d9ad77901fc6559eb18ae995acf366
Author: stefan
Category: javax / collections
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2020-11-09 12:50:37
Source code size: 151 bytes / 6 lines
Pitched / IR pitched: No / No
Views / Downloads: 143 / 196
Referenced in: [show references]