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

13
LINES

< > BotCompany Repo | #1007675 // solveCandidatesRiddle - solve a riddle checking different candidates

JavaX fragment (include)

1  
sbool solveCandidatesRiddle_debug = true;
2  
3  
static S solveCandidatesRiddle(L<Lisp> facts) {
4  
  // assume question is in last line of riddle
5  
  Lisp q = last(facts);
6  
  print("Solving: " + q);
7  
  L<S> candidates = subList(q.heads(), 1);
8  
  ret web_candidateWithMostConfirms(facts, q.s(0), candidates);
9  
}
10  
11  
static S solveCandidatesRiddle(L<Lisp> facts, S riddle) {
12  
  ret solveCandidatesRiddle(riddle(facts, riddle));
13  
}

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: #1007675
Snippet name: solveCandidatesRiddle - solve a riddle checking different candidates
Eternal ID of this version: #1007675/3
Text MD5: 39da61a26315721166a9a423a3b89a11
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-01 13:21:59
Source code size: 423 bytes / 13 lines
Pitched / IR pitched: No / No
Views / Downloads: 512 / 496
Version history: 2 change(s)
Referenced in: [show references]