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

32
LINES

< > BotCompany Repo | #1002812 // Prolog Variables Test (dev.)

JavaX source code - run with: x30.jar

!752

class Var {
  new Core core;
  Var next;
  
  Lisp get() {
    ret core.value;
  }
  
  boolean set(Lisp value) {
    ret core.set(value);
  }
  
  void unifyWith(Var v) {
    core = v.core;
  }
}

class Core {
  Lisp value;
  
  boolean set(Lisp val) {
    // existing
    if (value != null)
      ret eq(value, val);
    
    // new
    value = val;
    ret true;
  }
}

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: #1002812
Snippet name: Prolog Variables Test (dev.)
Eternal ID of this version: #1002812/1
Text MD5: c50929a797658f109bc480cf88ba8871
Author: stefan
Category: javax
Type: JavaX source code
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2016-02-27 01:23:07
Source code size: 408 bytes / 32 lines
Pitched / IR pitched: No / No
Views / Downloads: 1086 / 1033
Referenced in: [show references]