Last active
September 23, 2015 16:47
-
-
Save pimeys/dc18def4b0d1dec30e3f to your computer and use it in GitHub Desktop.
This file contains hidden or 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 findUser(params: Map[String,String]): Option[User] = | |
for { | |
uid <- params.get("uid") | |
appid <- params.get("appid") | |
} yield { | |
fetchUser(uid, appid) | |
} | |
def findUser(params: Map[String,String]): Option[User] = | |
params.get("uid").flatMap(uid => params.get("appid").map(appid => fetchUser(uid, appid))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment