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

9
LINES

< > BotCompany Repo | #1027136 // printIf

JavaX fragment (include)

static <A> A printIf(bool b, A a) {
  if (b) print(a);
  ret a;
}

static <A> A printIf(bool b, S s, A a) {
  if (b) print(s, a);
  ret a;
}

Author comment

Began life as a copy of #1017213

download  show line numbers  debug dex  old transpilations   

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

No comments. add comment

Snippet ID: #1027136
Snippet name: printIf
Eternal ID of this version: #1027136/3
Text MD5: b679f677f241997ffa3fe82062292ced
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2020-02-21 15:13:54
Source code size: 148 bytes / 9 lines
Pitched / IR pitched: No / No
Views / Downloads: 164 / 216
Version history: 2 change(s)
Referenced in: [show references]