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

11
LINES

< > BotCompany Repo | #1022175 // gazelle_executeSplitterRule

JavaX fragment (include)

1  
// include some generally used split functions
2  
please include function splitAtEllipsis.
3  
4  
static Collection<S> gazelle_executeSplitterRule(RuleEngine2 engine, RuleEngine2.SimplifyWithRule rule, S input) {
5  
  O f = rule.function();
6  
  Collection<S> out = cast(f instanceof S
7  
    ? callF(engine.callFunctionOnString, (S) f, input)
8  
    : callF(f, input));
9  
  if (l(out) == 1 && eq(first(out), input)) ret emptyList();
10  
  ret out;
11  
}

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: #1022175
Snippet name: gazelle_executeSplitterRule
Eternal ID of this version: #1022175/6
Text MD5: bd5a68c5eb6942546291f47cccbdcb7f
Author: stefan
Category: javax / a.i.
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2019-03-13 06:20:15
Source code size: 433 bytes / 11 lines
Pitched / IR pitched: No / No
Views / Downloads: 264 / 316
Version history: 5 change(s)
Referenced in: [show references]