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

5
LINES

< > BotCompany Repo | #1013611 // verifyFunctionPairOnInput

JavaX fragment (include)

static void verifyFunctionPairOnInput(O forward, O backward, O input) {
  O intermediate, output;
  if (!eq(input, output = callF(backward, intermediate = callF(forward, input))))
    fail("Function is not a pair: input=" + sfu(input) + ", output=" + sfu(output) + ", f=" + forward + ", g=" + backward + ", intermediate=" + sfu(intermediate));
}

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: #1013611
Snippet name: verifyFunctionPairOnInput
Eternal ID of this version: #1013611/4
Text MD5: dfc1501a3e5fde45c8919fa67ec69e88
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2018-01-11 14:45:44
Source code size: 349 bytes / 5 lines
Pitched / IR pitched: No / No
Views / Downloads: 297 / 332
Version history: 3 change(s)
Referenced in: [show references]