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

12
LINES

< > BotCompany Repo | #1023191 // applyWordTokRules

JavaX fragment (include)

1  
static Set<S> applyWordTokRules(L<? extends WordTokRule> rules, S s) {
2  
  ret concatListsToCISet(map(rules, rule ->
3  
    rule.matches(s) ? getStringEmits(rule) : null
4  
  );
5  
}
6  
7  
static Set<S> applyWordTokRules(L<? extends WordTokRule> rules, Collection<S> inputs, O... _) {
8  
  Set<S> out = cloneLinkedCISet(inputs);
9  
  for unnull (S input : inputs)
10  
    functionReturningList_transitiveHull_ciSet(func(S s) -> Collection<S> { applyWordTokRules(rules, s) }, input, optPar seen(_, out));
11  
  ret out;
12  
}

download  show line numbers  debug dex  old transpilations   

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

No comments. add comment

Snippet ID: #1023191
Snippet name: applyWordTokRules
Eternal ID of this version: #1023191/4
Text MD5: 420140cb4c4ec0756a4c59866f1b9cb8
Author: stefan
Category: javax / a.i.
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2019-07-08 20:32:45
Source code size: 503 bytes / 12 lines
Pitched / IR pitched: No / No
Views / Downloads: 402 / 410
Version history: 3 change(s)
Referenced in: [show references]