update monad in js of chapter 04