Download Jar. Libraryless. Click here for Pure Java version (1781L/12K).
!7 sclass Calculation { O f; OKOrError result; *() {} *(O *f) {} void calc() { try { result = OKOrError_ok(callF(f)); } catch e { result = OKOrError_error(e); } } } p { Calculation c = new Calculation(f now); c.calc(); print("Result: " + c.result); c = new Calculation(f fail); c.calc(); print("Result: " + c.result); }
download show line numbers debug dex old transpilations
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: | #1012583 |
Snippet name: | Reified Calculation v1 [OK] |
Eternal ID of this version: | #1012583/6 |
Text MD5: | 57bce34c62f2c1626da8348c47a2c8d3 |
Transpilation MD5: | c93bc7ebeebbba7382fc02eb3367703d |
Author: | stefan |
Category: | javax |
Type: | JavaX source code (desktop) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2017-12-07 14:36:50 |
Source code size: | 404 bytes / 27 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 512 / 1087 |
Version history: | 5 change(s) |
Referenced in: | #1012585 - Reified Calculation v2 [OK] |