improved lecture notes on monads