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

17
LINES

< > BotCompany Repo | #1014064 // MatchJob [Include]

JavaX fragment (include)

srecord MatchJob(L<S> input, L<S> struct) {
  new SS vars;
  
  void clear { input = new L; struct = new L; }
}

static MatchJob matchJob_solved() { ret MatchJob(new L, new L); }
sbool matchJob_isSolved(MatchJob mj) { ret mj != null && empty(mj.input) && empty(mj.struct); }

static MatchJob matchJob_map(O f, MatchJob mj) {
  ret MatchJob((L<S>) callF(f, mj.input), (L<S>) callF(f, mj.struct));
}

static void matchJob_apply(O f, MatchJob mj) {
  mj.input = (L<S>) callF(f, mj.input);
  mj.struct = (L<S>) callF(f, mj.struct);
}

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: #1014064
Snippet name: MatchJob [Include]
Eternal ID of this version: #1014064/1
Text MD5: 6b8bc14b1ff3525ba4cbf08f9fa6614a
Author: stefan
Category: javax / a.i.
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2018-03-27 22:00:57
Source code size: 545 bytes / 17 lines
Pitched / IR pitched: No / No
Views / Downloads: 249 / 291
Referenced in: [show references]