1 | // isTrue that, if passed a function, auto-calls it |
2 | // (for coroutines) |
3 | static boolean isTrue(O o) { |
4 | if (o instanceof Boolean) |
5 | ret ((Boolean) o).booleanValue(); |
6 | if (o == null) ret false; |
7 | ret ((Boolean) callF(o)).booleanValue(); |
8 | } |
9 | |
10 | static bool isTrue(O pred, O arg) { |
11 | ret booleanValue(callF(pred, arg)); |
12 | } |
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: | 551 / 828 |
Version history: | 1 change(s) |
Referenced in: | [show references] |