Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
This results in a deprecated warning for fn>. Posting here to link to a Jira ticket.
(ann get-number-of-cleared-spaces
[(IPersistentVector (IPersistentVector Any))
(defn get-number-of-cleared-spaces
"Returns the number of cleared spaces in the 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)
-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