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

13
LINES

< > BotCompany Repo | #1026747 // ai_findConfirmedPropositionsWithPattern (from feedback dir)

JavaX fragment (include) [tags: use-pretranspiled]

Libraryless. Click here for Pure Java version (5281L/34K).

1  
static LPair<ListWithFeedback, WithFeedback<Proposition>> ai_findConfirmedPropositionsWithPattern(S pat) {
2  
  new LPair<ListWithFeedback, WithFeedback<Proposition>> out;
3  
  for (File f : listFilesWithExtension(".struct", ai_listsWithFeedbackDir())) pcall {
4  
    ListWithFeedback list = ai_loadListWithFeedback(f);
5  
    fOr (WithFeedback<WithReasoning<S>> entry : list.data) {
6  
      if (!startsWithPlus(entry.feedback)) continue;
7  
      Proposition p = entry!;
8  
      if (match(pat, p!))
9  
        out.add(pair(list, entry));
10  
    }
11  
  }
12  
  ret out;
13  
}

download  show line numbers  debug dex  old transpilations   

Travelled to 7 computer(s): bhatertpkbcr, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, vouqrxazstgt, xrpafgyirdlv

No comments. add comment

Snippet ID: #1026747
Snippet name: ai_findConfirmedPropositionsWithPattern (from feedback dir)
Eternal ID of this version: #1026747/1
Text MD5: 7ad078bec173c42a18adfa34256cd325
Transpilation MD5: 09d102af104d88dbf79ded4c9910e9f1
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2020-01-19 22:06:15
Source code size: 551 bytes / 13 lines
Pitched / IR pitched: No / No
Views / Downloads: 114 / 178
Referenced in: [show references]