Middleware middleware(Middleware middleware(Handler innerHandler(Request request)))

Source

shelf.Middleware middleware(shelf.Middleware middleware) {
  return (shelf.Handler innerHandler) {
    return middleware(innerHandler);
  };
}