Does anyone know how to implement the function chain used in connect/express. So one can do this..
var app = {}, app.stack = [];
app.use(function(r, s, n){
// dosomething
})
require('http').createServer(function(r, s){
// execute functions in app stack
})