Last active
January 3, 2018 21:47
-
-
Save amirkarimi/4df63c934de938bfef6f9d560ce32bf9 to your computer and use it in GitHub Desktop.
Don’t listen to them, learn Cats this way
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 getUser(id: Int): Option[User] = ??? | |
getUser(10) match { | |
case None => println(“User not found”) | |
case Some(user) => println(s”User: $user”) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment