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

11
LINES

< > BotCompany Repo | #1021114 // concatMapToCISet

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

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

1  
// f must return a collection of strings
2  
static Set<S> mapLike concatMapToCISet(O f, Iterable l) {
3  
  Set<S> set = ciSet();
4  
  if (l != null) for (O o : l)
5  
    addAll(set, (Collection<S>) callF(f, o));
6  
  ret set;
7  
}
8  
9  
static <A> Set<S> mapLike concatMapToCISet(Iterable<A> l, IF1<A, Cl<S>> f) {
10  
  ret concatMapToCISet(f, l);
11  
}

Author comment

Began life as a copy of #1005492

download  show line numbers  debug dex  old transpilations   

Travelled to 9 computer(s): bhatertpkbcr, cfunsshuasjs, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, vouqrxazstgt, whxojlpjdney, xrpafgyirdlv

No comments. add comment

Snippet ID: #1021114
Snippet name: concatMapToCISet
Eternal ID of this version: #1021114/5
Text MD5: d8b89c833ca6bf522073322b46704bfc
Transpilation MD5: 07dbe925264558ca0a0f80a694907145
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2020-03-16 15:49:53
Source code size: 332 bytes / 11 lines
Pitched / IR pitched: No / No
Views / Downloads: 285 / 360
Version history: 4 change(s)
Referenced in: [show references]