static Map<Pair<S>, Bool> ai_isRuleSuitableForFunction_cache = synchroHashMap(); static bool ai_isRuleSuitableForFunction(S rule, S f) { Pair<S> p = pair(rule, f); Bool b = ai_isRuleSuitableForFunction_cache.get(p); if (b != null) ret b; try { callAndMake(f, rule, null); ai_isRuleSuitableForFunction_cache.put(p, true); true; } catch e { if (shortClassNameIs(e, "UnsuitableRuleException")) { ai_isRuleSuitableForFunction_cache.put(p, false); false; } else { ai_isRuleSuitableForFunction_cache.put(p, false); printException(e); throw FunctionIsBroken(f); } } }
download show line numbers debug dex old transpilations
Travelled to 13 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt
No comments. add comment
Snippet ID: | #1013183 |
Snippet name: | ai_isRuleSuitableForFunction |
Eternal ID of this version: | #1013183/5 |
Text MD5: | 7a3450e188085e0cabcdde0ed18db6be |
Author: | stefan |
Category: | javax / a.i. |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2017-12-27 06:21:28 |
Source code size: | 647 bytes / 21 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 463 / 472 |
Version history: | 4 change(s) |
Referenced in: | #1006654 - Standard functions list 2 (LIVE, continuation of #761) |