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

8
LINES

< > BotCompany Repo | #1010216 // ai_makeTester - make tester predicate for a property from web

JavaX fragment (include)

static O ai_makeTester(Web web, S thing, S property) {
  WebNode node = web_findNodeWithForwardRelations(web, "A standard function that tests", "what", thing, "for property", property);
  if (node == null) fail("No tester for " + thing + " / " + property);
  fS sfName = assertNotNull(web_operandText(node, "is"));
  print("Using function: " + sfName + " for " + thing + " / " + property);
  final Class c = loadFunctions_cached(sfName);
  ret func(O o) { call(c, sfName, o) };
}

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: #1010216
Snippet name: ai_makeTester - make tester predicate for a property from web
Eternal ID of this version: #1010216/4
Text MD5: 9d695c0ab67e5014dd0c797d09f87b84
Author: stefan
Category: javax / a.i.
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2017-09-06 21:17:36
Source code size: 486 bytes / 8 lines
Pitched / IR pitched: No / No
Views / Downloads: 377 / 394
Version history: 3 change(s)
Referenced in: [show references]