Permalink
Browse files

Use condp to simplify yes-or-no-prompt

  • Loading branch information...
1 parent f17f608 commit f83596cc968bd8e00aa0ea04981f3078f16f8457 @purcell purcell committed with Licenser Aug 9, 2010
Showing with 4 additions and 4 deletions.
  1. +4 −4 src/leiningen/update.clj
@@ -15,10 +15,10 @@
v)]))))
(defn yes-or-no-prompt [question]
- (condp (= (prompt-for-input (str question " (y/n)")))
- "y" :>> true
- "n" :>> false
- (recur question)))
+ (condp = (prompt-for-input (str question " (y/n) "))
+ "y" true
+ "n" false
+ (recur question)))
(defn ask-for-update [artifact version new-version]
(yes-or-no-prompt (str "You are currently using "artifact" in version "version". Do you want to update to "new-version"?")))

0 comments on commit f83596c

Please sign in to comment.