예제 #1
0
        private IEnumerator _Do(IMonad <T> m)
        {
            yield return(m.Do());

            if (m.Error != null)
            {
                Error = m.Error;
            }
        }
예제 #2
0
파일: TestMonad.cs 프로젝트: rayark/mast
        // create a coroutine and resume it until the monad is finished
        static void _Wait <T>(IMonad <T> monad)
        {
            var co = new Coroutine(monad.Do());

            while (!co.Finished)
            {
                co.Resume(0.03f);
            }
        }
예제 #3
0
        private IEnumerator _Do(IMonad <T> m)
        {
            yield return(m.Do());

            if (m.Error != null && _onlyCompleted)
            {
                yield break;
            }
            _any = m;
        }