-
-
Save mattpodwysocki/8d9a17df9fb94a3fb631 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Like so? | |
signals.Publish(_signals => _signals.Where(s => isBusy(s)).Publish(_busy => | |
from s in _busy | |
from n in _signals.Where(s => isNotBusy(s)).TakeUntil(endTime).Count().Where(n => n == 0).TakeUntil(_busy) | |
select TurnIndicatorOn))))))) | |
--------B----N---N---------B---N------N----N---B---------------------------- _signals | |
--------B------------------B-------------------B---------------------------- _busy | |
|----N----N---x |---N------N----N--x|----------x _signals.Where(s => isNotBusy(s)).TakeUntil(endTime).TakeUntil(_busy) | |
-------------2 ------------------3 ----------0 _signals.Where(s => isNotBusy(s)).TakeUntil(endTime).Count() | |
----------------------------------------------------------On--------------- |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment