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

15
LINES

< > BotCompany Repo | #1008296 // matchCondition_first

JavaX fragment (include)

static Map<S, Lisp> matchCondition_first(Lisp condition, Map<S, Lisp> m) {
  L<Lisp> facts = lispTruth();
  
  O evaluator = getLispEvaluator(condition.head);
  if (evaluator != null)
    ret isTrue(callF(evaluator, lispReplaceVars(condition, m))) ? m : null;

  L<Map<S, Lisp>> candidates = new L;
  for (Lisp fact : facts) {
    Map<S, Lisp> m2 = cloneMap(m);
    if (lispMatchIC_xyzVars_sub(condition, fact, m2))
      ret m2;
  }
  null;
}

Author comment

Began life as a copy of #1008129

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: #1008296
Snippet name: matchCondition_first
Eternal ID of this version: #1008296/1
Text MD5: 2eeb438a117b633567f539fc6bbe43f5
Author: stefan
Category: javax / a.i.
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2017-05-07 00:23:58
Source code size: 459 bytes / 15 lines
Pitched / IR pitched: No / No
Views / Downloads: 325 / 367
Referenced in: [show references]