Created
January 22, 2019 00:00
-
-
Save TylerPachal/307f81867adea2fb8797e7a24a50604b 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 join_game(user_id, game_id) do | |
| with {:user, {:ok, user}} <- get_user(user_id), | |
| {:game, {:ok, game}} <- get_game(game_id), | |
| # Etc... | |
| end | |
| defp get_user(id) do | |
| {:user, Users.get(id)} | |
| end | |
| defp get_game(id) do | |
| {:game, Games.get(id)} | |
| end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment