Created
May 22, 2013 20:10
-
-
Save objectiveSee/5630515 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
/** | |
* question: how can I rewrite lines 8 & 9 to not use an intermediate function? | |
* | |
* | |
*/ | |
Q.fcall(this.findGamesNearby.bind(this,user,location)) | |
.then(function(games_nearby) { | |
return matchmaking.makeGameIfNeeded(games_nearby, user, location); | |
}); | |
// games_nearby is what findGamesNearby() passes as the parameter when it calls deferred.resolve(result); | |
// The return value of findGamesNearby() is a deferred promise. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment