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

12
LINES

< > BotCompany Repo | #1023199 // applyWordTokRules_es - use applyAttractors_es instead

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

Libraryless. Click here for Pure Java version (4339L/26K).

1  
static Set<ES> applyWordTokRules_es(L<WordTokRule> rules, ES s) {
2  
  ret concatListsToCISet_es(map(rules, rule ->
3  
    rule.matches(s!) ? getStringEmits_es(rule) : null
4  
  ));
5  
}
6  
7  
static Set<ES> applyWordTokRules_es(L<WordTokRule> rules, Collection<ES> inputs) {
8  
  Set<ES> out = cloneLinkedCISet_es(inputs);
9  
  for unnull (ES input : inputs)
10  
    functionReturningList_transitiveHull_ciSet_es(func(ES s) -> Collection<ES> { applyWordTokRules_es(rules, s) }, input, seen := out);
11  
  ret out;
12  
}

Author comment

Began life as a copy of #1023191

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: #1023199
Snippet name: applyWordTokRules_es - use applyAttractors_es instead
Eternal ID of this version: #1023199/9
Text MD5: 19c62524a3be0883f3eec08c1fdace49
Transpilation MD5: e0b64ee7617a3ec2d135835317a28829
Author: stefan
Category: javax / a.i.
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2019-05-19 10:08:13
Source code size: 498 bytes / 12 lines
Pitched / IR pitched: No / No
Views / Downloads: 300 / 415
Version history: 8 change(s)
Referenced in: [show references]