Created

Embed URL

HTTPS clone URL

SSH clone URL

You can clone with HTTPS or SSH.

Download Gist

This results in a deprecated warning for fn>. Posting here to link to a Jira ticket.

View core.typed-deprecated-warning.clj
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
(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
Something went wrong with that request. Please try again.