Created
August 5, 2020 04:50
-
-
Save sztamas/29ef8173f606e3ca4cf14970bc6f85dc to your computer and use it in GitHub Desktop.
The Frugal Gentleman
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 select-georges-wine [wines] | |
(condp = (count wines) | |
0 nil | |
1 (first wines) | |
(second (sort-by :price wines)))) | |
(def choose-wine (comp :name select-georges-wine)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment