Closed psychobaatezu closed 4 years ago
Hi! Really interesting book so far. Enjoying it. But I have difficulty to understand how the solution of the last exercise could work.
const validateName = ({ name }) => (name.length > 3 ? Either.of(null) : left('Your name need to be > 3') ); const saveAndWelcome = compose(map(showWelcome), save); const register = compose( either(IO.of, saveAndWelcome), validateUser(validateName), );
How could saveAndWelcome actually save the user if it receives an Either.of(null) from validateName?
Nevermind... Figured it out.
Hi! Really interesting book so far. Enjoying it. But I have difficulty to understand how the solution of the last exercise could work.
How could saveAndWelcome actually save the user if it receives an Either.of(null) from validateName?