// isTrue that, if passed a function, auto-calls it // (for coroutines) static boolean isTrue(O o) { if (o instanceof Boolean) ret ((Boolean) o).booleanValue(); if (o == null) ret false; ret ((Boolean) callF(o)).booleanValue(); } static bool isTrue(O pred, O arg) { ret booleanValue(callF(pred, arg)); }
Began life as a copy of #1002662
download show line numbers debug dex old transpilations
Travelled to 14 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, irmadwmeruwu, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt
No comments. add comment
| Snippet ID: | #1007935 |
| Snippet name: | isTrue for coroutines |
| Eternal ID of this version: | #1007935/2 |
| Text MD5: | d1c234d890f1c1132dc64cdbc0184d7e |
| Author: | stefan |
| Category: | javax |
| Type: | JavaX fragment (include) |
| Public (visible to everyone): | Yes |
| Archived (hidden from active list): | No |
| Created/modified: | 2018-09-01 00:19:56 |
| Source code size: | 327 bytes / 12 lines |
| Pitched / IR pitched: | No / No |
| Views / Downloads: | 815 / 1092 |
| Version history: | 1 change(s) |
| Referenced in: | #1004241 - Coroutines (include) |