The $ 787 billion bill was a classic rendering of the precepts of economist John Maynard Keynes : With employers laying off workers , credit drying up and consumers battening down , the theory went , the government needed to do all it could to inject demand .