import { IterableX } from './iterablex' ; class RangeIterable extends IterableX < number > { private _start : number ; private _count : number ; constructor ( start , count ) { super ( ) ; this . _start = start ; this . _count = count ; } * [ Symbol . iterator ] ( ) { for ( let current = this . _start , end = this . _start + this . _count ; current < end ; current ++ ) { yield current ; } } } param { number } start param { number } count returns { IterableX < number > } export function range ( start , count ) { return new RangeIterable ( start , count ) ; }