How to fork and merge monads?
问题 I am learning monads and doing my first "login" case. The steps are simple: User input userName and password; From database, get user by userName, and get its password saved in database; compare the input password with the one in the database. From the above, there is a requirements to fork 2 monads and merge them to compare. I read nearly all javascripts FP books and monads implementations I can think of, but still cannot found any solutions. The below is what I got so far, it works, but it