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

7
LINES

< > BotCompany Repo | #1024304 // grabValueAndCancel

JavaX fragment (include) [tags: use-pretranspiled]

Libraryless. Click here for Pure Java version (1792L/12K).

static <A> A grabValueAndCancel(VF1<VF1<A>> r) {
  new Var<A> var;
  withCancelPoint(voidfunc(CancelPoint cp) {
    callF(r, voidfunc(A a) { var.set(a); cancelTo(cp) });
  });
  ret var!;
}

download  show line numbers  debug dex  old transpilations   

Travelled to 6 computer(s): bhatertpkbcr, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, vouqrxazstgt

No comments. add comment

Snippet ID: #1024304
Snippet name: grabValueAndCancel
Eternal ID of this version: #1024304/2
Text MD5: 45d2c5572624790a32e4644e20488888
Transpilation MD5: d01c93bad5f1b5c64e2f4b6bb3b49842
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2019-07-30 23:07:01
Source code size: 195 bytes / 7 lines
Pitched / IR pitched: No / No
Views / Downloads: 272 / 334
Version history: 1 change(s)
Referenced in: [show references]