Libraryless. Click here for Pure Java version (4527L/25K).
static <A, B> B rCallFUnlessNull(A a, IF1<A, B> f) { ret a == null ?: f?.get(a); } static <A> void rCallFUnlessNull(A a, IVF1<A> f) { if (a != null) f?.get(a); }
Began life as a copy of #1031677
download show line numbers debug dex old transpilations
Travelled to 4 computer(s): bhatertpkbcr, ekrmjmnbrukm, mowyntqkapby, mqqgnosmbjvj
No comments. add comment
Snippet ID: | #1033539 |
Snippet name: | rCallFUnlessNull - call function on argument unless argument is null |
Eternal ID of this version: | #1033539/2 |
Text MD5: | 4e5327f9ecc54737ce0f2c495d0099aa |
Transpilation MD5: | 170e5383a9fb443ec9cc78de3d324ddb |
Author: | stefan |
Category: | javax |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2021-11-01 22:50:08 |
Source code size: | 172 bytes / 7 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 142 / 215 |
Version history: | 1 change(s) |
Referenced in: | #1006654 - Standard functions list 2 (LIVE, continuation of #761) |