Last active
April 5, 2018 09:50
-
-
Save MarcoWorms/b51fd9a6318827870cd59f7a7fb41333 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
const draw = (cardPicker, deck) => { | |
// 1. We want to know what card we drew | |
const card = cardPicker(deck) | |
// 2. We want the new deck without the drawn card | |
const newDeck = without(card, deck) | |
return { card, newDeck } | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment