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

26
LINES

< > BotCompany Repo | #1000512 // LPost (learner)

IOIOI

1  
// The idea is to postprocess to match out
2  
// e.g. out="a, b, c"
3  
// and f=FJoin(", ")
4  
5  
static class LPost extends LearnerImpl {
6  
  ReversibleFunction f;
7  
  Learner base;
8  
  
9  
  *(ReversibleFunction *f, Learner *base) {}
10  
  
11  
  public void processInOut(Object in, Object out) {
12  
    out = f.unprocess(out);
13  
    base.processInOut(in, out);
14  
  }
15  
  
16  
  public Object processIn(Object in) {
17  
    in = base.processIn(in);
18  
    in = f.process(in);
19  
    return in;
20  
  }
21  
  
22  
  public void toJava(Code code) {
23  
    base.toJava(code);
24  
    f.toJava_process(code);
25  
  }
26  
}

Author comment

Began life as a copy of #1000511

download  show line numbers   

Travelled to 14 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, onxytkatvevr, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt

No comments. add comment

Snippet ID: #1000512
Snippet name: LPost (learner)
Eternal ID of this version: #1000512/1
Text MD5: c422dc6182f4401214cb4a68612cdf0c
Author: stefan
Category:
Type: IOIOI
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2015-08-09 20:36:08
Source code size: 569 bytes / 26 lines
Pitched / IR pitched: No / Yes
Views / Downloads: 688 / 912
Referenced in: [show references]