export function range ( from , to , step = 1 ) { return [ ... Array ( Math . floor ( ( to - from ) / step ) + 1 ) ] . map ( ( _ , i ) => from + i * step ) ; } export function inherit ( ) { Array . prototype . range = function ( from , to , step ? ) : number [ ] { return range ( from , to , step ) ; } ; } export default range ;