Created
March 12, 2014 15:12
-
-
Save echosa/9508942 to your computer and use it in GitHub Desktop.
This results in a deprecated warning for fn>. Posting here to link to a Jira ticket.
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
(ann get-number-of-cleared-spaces | |
[(IPersistentVector (IPersistentVector Any)) | |
-> | |
AnyInteger]) | |
(defn get-number-of-cleared-spaces | |
"Returns the number of cleared spaces in the grid." | |
[grid] | |
(inc (reduce (fn> [[cleared :- AnyInteger] | |
[row :- (IPersistentVector Any)]] | |
(let [result (inc (reduce (fn> [[row-cleared :- AnyInteger] | |
[grid-item :- Any]] | |
(if (or (= grid-item 0) | |
(= grid-item "@")) | |
(inc row-cleared) | |
row-cleared)) | |
-1 row))] | |
(+ cleared result))) | |
-1 grid))) | |
;; "DEPRECATED WARNING: fn> syntax has changed, use [b :- t i] for clauses" "ns: " #<Namespace greed.grid> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment