Created
February 10, 2020 12:47
-
-
Save Algiras/fe14d551df32778e1c76b36ee66cd302 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def newUser(username: String, password: String): IO[User] = | |
Applicative[IO].map2( | |
FUUID.randomFUUID[IO].map(tagFUUIDAsUserId), | |
BCrypt.hashpw[IO](password) | |
)(User(_, username, _)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment