static S ai_subst_web(S webID) { int n = websMadeInThread(); Web web = assertNotNull("Web not found: " + webID, ai_getWeb(webID)); WebRelation rel = assertNotNull(web_findRelationNamed(web, "matches")); S pat = web_unquoted(rel.a), input = web_unquoted(rel.b); assertEquals("substitute * => * with *", pat); new Matches m; assertTrue(flexMatchIC(pat, input, m)); S src = unquote(m.get(0)); L<S> terms = unquoteAll(trimAll(splitAtJavaToken(m.get(1), ","))); ai_postTriple_multi(src, "see:", terms); ret nWebs(websMadeInThread()-n) + " made"; }
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: | #1011554 |
Snippet name: | ai_subst_web |
Eternal ID of this version: | #1011554/5 |
Text MD5: | 86adea64962e229db01de813c9fd27fb |
Author: | stefan |
Category: | javax / a.i. |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2017-11-26 20:43:59 |
Source code size: | 576 bytes / 13 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 515 / 547 |
Version history: | 4 change(s) |
Referenced in: | [show references] |