export function * range ( a , b ? , step ? ) { if ( step === undefined || b === undefined ) { if ( b === undefined ) { b = a ; a = 0 ; step = 1 ; } else { step = a < b ? 1 : - 1 ; } } if ( a === b || step === 0 ) { return ; } if ( a < b ) { if ( step < 0 ) { return ; } while ( a < b ) { yield a ; a += step ; } } if ( a > b ) { if ( step > 0 ) { return ; } while ( a > b ) { yield a ; a += step ; } } } export function rangei ( a , b ? , step ? ) { if ( step === undefined || b === undefined ) { if ( b === undefined ) { b = a ; a = 1 ; step = 1 ; } else { step = a < b ? 1 : - 1 ; } } return range ( a , b + step , step ) ; }