Created
January 13, 2011 04:06
-
-
Save amalloy/777365 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
(cond ; can be hard to tell which is a test and which is a return value | |
(zero? (reduce + input-values)) 0 | |
(empty? (filter #{val1 val2 val3} (map #(foo x (nth % 4)) | |
y))) | |
(some #{question answer} (last user-input)) | |
...) | |
(cond ; looks weird, and leaves a complex last-form in doubt anyway | |
(zero? (reduce + input-values)) | |
0 | |
(empty? (filter #{val1 val2 val3} (map #(foo x (nth % 4)) | |
y))) | |
(some #{question answer} (last user-input)) | |
...) | |
(cond ; what if this were allowed? [...] is never nil, so won't conflict | |
(zero? (reduce + input-values)) 0 | |
[(empty? (filter #{val1 val2 val3} (map #(foo x (nth % 4)) | |
y))) | |
(some #{question answer} (last user-input))] | |
...) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment