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).

static Set<ES> applyWordTokRules_es(L<WordTokRule> rules, ES s) {
  ret concatListsToCISet_es(map(rules, rule ->
    rule.matches(s!) ? getStringEmits_es(rule) : null
  ));
}

static Set<ES> applyWordTokRules_es(L<WordTokRule> rules, Collection<ES> inputs) {
  Set<ES> out = cloneLinkedCISet_es(inputs);
  for unnull (ES input : inputs)
    functionReturningList_transitiveHull_ciSet_es(func(ES s) -> Collection<ES> { applyWordTokRules_es(rules, s) }, input, seen := out);
  ret out;
}

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: 235 / 327
Version history: 8 change(s)
Referenced in: [show references]