static S ai_ifThenSay(S rule, S input) { new Matches m; ai_opCheck(rule, "if * then say *", m); S condition = roundBrackets($1); S sf = ai_text(condition, "matches to predicate", "$X"); if (sf == null) fail("no matching predicate found for " + condition); if (!isTrue(ai_callSafeSFOnInput(sf, input))) null; ret $2; }
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: | #1013272 |
Snippet name: | ai_ifThenSay |
Eternal ID of this version: | #1013272/3 |
Text MD5: | 0bd930777b4ce48c4b3a931843bcdc6c |
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-31 02:02:40 |
Source code size: | 343 bytes / 10 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 331 / 365 |
Version history: | 2 change(s) |
Referenced in: | [show references] |