// f : func -> A // pred: func(A) -> bool static O repeatUntilMatches(O f, O pred, int timeOut) { long time = sysNow(); while (!timedOut(time, timeOut)) { O a = callF(f); if (isTrue(callF(pred, a))) ret a; } null; }
download show line numbers debug dex old transpilations
Travelled to 13 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt
No comments. add comment
Snippet ID: | #1012927 |
Snippet name: | repeatUntilMatches |
Eternal ID of this version: | #1012927/1 |
Text MD5: | 6d031be39323d9532726347faa917719 |
Author: | stefan |
Category: | javax |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2017-12-17 23:49:19 |
Source code size: | 240 bytes / 10 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 378 / 394 |
Referenced in: | [show references] |