I have this input validation code:
let res = {}; res.validate = function (body) { return toValid(!!body, `Empty body`) .flatMap(_ => toValid(