dist/index.js
function next(i, p, task) {
        let iResult = task ? { value: task, done: false } : i.next();
        try {
            if (iResult.done) {
                publish($state);
                return;
            }
            const result = iResult.value($state, p);
            /* Promise(Like) */
            if (result && typeof result.then === 'function') {
                result.then(resolved, rejected);
                publish($state);
                return;
                function resolved(t) {
                    const _t = (typeof t === 'function') && t;
                    next(i, p, _t);
                }
                ;
                function rejected(err) {
                    publish($state, err);
                }
            }
            if (!iResult.done) {
                result && setState(result);
                next(i, p);
                return;
            }
        }
        catch (e) {
            publish($state, e);
        }
    }
function next(i, p, task) {
        let iResult = task ? { value: task, done: false } : i.next();
        try {
            if (iResult.done) {
                publish($state);
                return;
            }
            const result = iResult.value($state, p);
            /* Promise(Like) */
            if (result && typeof result.then === 'function') {
                result.then(resolved, rejected);
                publish($state);
                return;
                function resolved(t) {
                    const _t = (typeof t === 'function') && t;
                    next(i, p, _t);
                }
                ;
                function rejected(err) {
                    publish($state, err);
                }
            }
            if (!iResult.done) {
                result && setState(result);
                next(i, p);
                return;
            }
        }
        catch (e) {
            publish($state, e);
        }
    }
function next ( i , p , task ) { let iResult = task ? { value : task , done : false } : i . next ( ) ; try { if ( iResult . done ) { publish ( $state ) ; return ; } const result = iResult . value ( $state , p ) ; /* Promise(Like) */ if ( result && typeof result . then === 'function' ) { result . then ( resolved , rejected ) ; publish ( $state ) ; return ; function resolved ( t ) { const _t = ( typeof t === 'function' ) && t ; next ( i , p , _t ) ; } ; function rejected ( err ) { publish ( $state , err ) ; } } if ( ! iResult . done ) { result && setState ( result ) ; next ( i , p ) ; return ; } } catch ( e ) { publish ( $state , e ) ; } }
Execute one task from iterator then
mutation state and publishing

@private
@param {Iterator<Function>} i
@param {*} p
@param {Function} [task]
@returns {void}
Execute one task from iterator then mutation state and publishing