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

18
LINES

< > BotCompany Repo | #1022801 // AbstractSayAndInputBot - with say() and input()

JavaX fragment (include)

sclass AbstractSayAndInputBot {
  VF1<S> say; // primary output listener
  L onOutput; // more output listeners (L<VF1<S>>)
  F0<S> input;
  
  void say(S s) {
    callF(say, s);
    pcallFAll(onOutput, s);
  }
  
  void say(Iterable<S> l) {
    for unnull (S s : l) say(s);
  }
  
  S input() {
    ret callF(input);
  }
}

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: #1022801
Snippet name: AbstractSayAndInputBot - with say() and input()
Eternal ID of this version: #1022801/3
Text MD5: 3476c7084972d4cfe6b7ba732808cc86
Author: stefan
Category: javax / a.i.
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2019-05-15 18:04:59
Source code size: 340 bytes / 18 lines
Pitched / IR pitched: No / No
Views / Downloads: 316 / 768
Version history: 2 change(s)
Referenced in: #1022804 - AttractorBot - trying to make persistable (attractors and preprocessors are transient)
#1034167 - Standard Classes + Interfaces (LIVE, continuation of #1003674)