Middleware: Middleware

The shape of a middleware produced by defineMiddleware.

Three call signatures:

The two directions cannot share one signature: the cascade needs the handler argument to be a dead inference site, and the propagation needs it to be the live one. Splitting them into ordered overloads lets each keep what it needs.

Parameters