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)

1  
sclass AbstractSayAndInputBot {
2  
  VF1<S> say; // primary output listener
3  
  L onOutput; // more output listeners (L<VF1<S>>)
4  
  F0<S> input;
5  
  
6  
  void say(S s) {
7  
    callF(say, s);
8  
    pcallFAll(onOutput, s);
9  
  }
10  
  
11  
  void say(Iterable<S> l) {
12  
    for unnull (S s : l) say(s);
13  
  }
14  
  
15  
  S input() {
16  
    ret callF(input);
17  
  }
18  
}

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: 257 / 706
Version history: 2 change(s)
Referenced in: [show references]