Can the koa2-compose source code be modified as follows?

https://github.com/koajs/comp.
// source link
//koa callback
 const fn = compose(this.middleware);

 fn(ctx).then(handleResponse).catch(onerror); //fncomposectxnextundefined
//compose
function compose (middleware) {
....
return function (context, next) { //next
    // last called middleware -sharp
    let index = -1
    return dispatch(0)
    function dispatch (i) {
      if (i <= index) return Promise.reject(new Error("next() called multiple times"))
      index = i
      let fn = middleware[i]    
      if (i === middleware.length) fn = next//jsundefined  nextundefined
      if (!fn) return Promise.resolve()
     
      try {
        return Promise.resolve(fn(context, function next () {
          return dispatch(i + 1)
        }))
      } catch (err) {
        return Promise.reject(err)
      }
    }
  }
}
Mar.09,2021
MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b3a326-2c1ff.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b3a326-2c1ff.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?