Created
August 5, 2018 21:36
-
-
Save pjagielski/4d3cc563c448e9e2acc90f3e5705cc28 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
(defn winner-side [match] | |
(let [winner (:winner match)] | |
(cond | |
(= winner (:home_team_country match)) :home | |
(= winner (:away_team_country match)) :away))) | |
(defn come-back? [match] | |
(let [first-scored-side (first-scored-side match) | |
winner-side (winner-side match)] | |
(and (not (nil? winner-side)) | |
(not= winner-side first-scored-side)))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment