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

16
LINES

< > BotCompany Repo | #1020758 // pcallFInRealOrMyMC - pcallF + adjust for real main class

JavaX fragment (include)

static O pcallFInRealOrMyMC(fO realm, fO f, fO... args) {
  pcall { ret callFInRealOrMyMC(realm, f, args); }
  null;
}

ifclass F0
static <A> A pcallFInRealOrMyMC(O realm, F0<A> f) null on exception {
  ret f == null ? null : f.get();
}
endif

ifclass F1
static <A, B> B pcallFInRealOrMyMC(O realm, F1<A, B> f, A a) null on exception {
  ret f == null ? null : f.get(a);
}
endif

Author comment

Began life as a copy of #1020756

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: #1020758
Snippet name: pcallFInRealOrMyMC - pcallF + adjust for real main class
Eternal ID of this version: #1020758/1
Text MD5: 2e576ec252b99a2cc9df76547180811c
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2019-01-01 20:16:13
Source code size: 393 bytes / 16 lines
Pitched / IR pitched: No / No
Views / Downloads: 180 / 203
Referenced in: [show references]