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

26
LINES

< > BotCompany Repo | #1007955 // generalLispEval - evaluate according to definitions in lispTruth

JavaX fragment (include)

1  
static O generalLispEval(Lisp l) {
2  
  if (l == null) null;
3  
  
4  
  if (l.size() == 1 && lispTrue("hkihrqgdlkdayxzn", l.head))
5  
    ret generalLispEval(l.get(0));
6  
  
7  
  S evaluator = first(followForwardRelation_raw("mssmzemxxztdpphw", l.head));
8  
  if (evaluator != null)
9  
    ret conceptCall(evaluator, map(f generalLispEval, l));
10  
    
11  
  S sf = first(followForwardRelation_raw("olphazqzxxnvtjcx", l.head));
12  
  if (sf != null)
13  
    ret makeAndCall_cached(sf, asObjectArray(map(f generalLispEval, l)));
14  
    
15  
  if (l.isLeaf()) {
16  
    for (Lisp rule : lispTruth2("yrxfddfomyzlqwri"))
17  
      if (isTrue(callConcept(rule.raw(0), l.head)))
18  
        ret callConcept(rule.get(1), l.head);
19  
        
20  
    for (Lisp rule : lispTruth2("wwaprwlmqzqeaikp"))
21  
      if (isTrue(makeAndCall_cached(rule.raw(0), l.head)))
22  
        ret makeAndCall_cached(rule.raw(1), l.head);
23  
  }
24  
        
25  
  fail("Can't evaluate " + l);
26  
}

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: #1007955
Snippet name: generalLispEval - evaluate according to definitions in lispTruth
Eternal ID of this version: #1007955/6
Text MD5: eed548aa16914f4bcae0433ab03287aa
Author: stefan
Category: javax / a.i.
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2017-04-17 21:37:07
Source code size: 910 bytes / 26 lines
Pitched / IR pitched: No / No
Views / Downloads: 549 / 548
Version history: 5 change(s)
Referenced in: [show references]