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

5
LINES

< > BotCompany Repo | #1026099 // IfThenElse1

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

Libraryless. Click here for Pure Java version (84L/1K).

srecord IfThenElse1<A>(IF0<Bool> condition, IF0<A> trueBranch, IF0<A> falseBranch) implements IF0<A> {
  public A get() {
    ret condition! ? trueBranch! : falseBranch!;
  }
}

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: #1026099
Snippet name: IfThenElse1
Eternal ID of this version: #1026099/2
Text MD5: 11bbe5009f1b2abffcf818a229e7e0bd
Transpilation MD5: db5d6d747d35a34c24b0bad4159ce610
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2019-11-21 22:27:22
Source code size: 180 bytes / 5 lines
Pitched / IR pitched: No / No
Views / Downloads: 157 / 499
Version history: 1 change(s)
Referenced in: [show references]