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

20
LINES

< > BotCompany Repo | #1021809 // Gazelle Temp Facts

JavaX source code (Dynamic Module) [tags: use-pretranspiled] - run with: Stefan's OS

Uses 911K of libraries. Click here for Pure Java version (8751L/46K).

1  
!7
2  
3  
concept TempFact {
4  
  S globalID = aGlobalID();
5  
  S text;
6  
  S context;
7  
}
8  
9  
cmodule GazelleTempFacts > DynCRUD<TempFact> {
10  
  // API
11  
  
12  
  Pair<S, Bool> addTempFact(S text, S context) {
13  
    Pair<TempFact, Bool> p = uniq2_sync(TempFact, +text, +context);
14  
    ret pair(p.a.globalID, p.b);
15  
  }
16  
  
17  
  bool hasTempFact(S text) {
18  
    ret hasConceptWhere TempFact(+text);
19  
  }
20  
}

download  show line numbers  debug dex  old transpilations   

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

No comments. add comment

Snippet ID: #1021809
Snippet name: Gazelle Temp Facts
Eternal ID of this version: #1021809/9
Text MD5: c8b785312c7dd4798ce364752ef9a9e9
Transpilation MD5: be4e1bb9ae500b1845abacaa31d08cb8
Author: stefan
Category: javax / gazelle
Type: JavaX source code (Dynamic Module)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2019-02-28 11:34:25
Source code size: 387 bytes / 20 lines
Pitched / IR pitched: No / No
Views / Downloads: 312 / 38026
Version history: 8 change(s)
Referenced in: [show references]