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

5
LINES

< > BotCompany Repo | #1029086 // pairsASet

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

Libraryless. Click here for Pure Java version (2475L/16K).

1  
static <A, B> Set<A> pairsASet(Collection<Pair<A, B>> l) {
2  
  new Set<A> out;
3  
  for (Pair<A, B> p : unnull(l)) out.add(firstOfPair(p));
4  
  ret out;
5  
}

Author comment

Began life as a copy of #1009342

download  show line numbers  debug dex  old transpilations   

Travelled to 7 computer(s): bhatertpkbcr, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, vouqrxazstgt, xrpafgyirdlv

No comments. add comment

Snippet ID: #1029086
Snippet name: pairsASet
Eternal ID of this version: #1029086/3
Text MD5: 10c40c06a0a3e9bcb6f03c2eb6139849
Transpilation MD5: 9afcf0c36f599eb92125473afa5362b0
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2020-07-19 02:54:06
Source code size: 151 bytes / 5 lines
Pitched / IR pitched: No / No
Views / Downloads: 169 / 263
Version history: 2 change(s)
Referenced in: [show references]