Skip to content

Instantly share code, notes, and snippets.

@mh120888
Created June 28, 2016 00:10
Show Gist options
  • Save mh120888/e83cce063ef2e7f1f176d3c7c5bd9502 to your computer and use it in GitHub Desktop.
Save mh120888/e83cce063ef2e7f1f176d3c7c5bd9502 to your computer and use it in GitHub Desktop.
Should this be extracted?
(defn get-number-of-rows
[board]
(int (java.lang.Math/sqrt (count board))))
(defn get-winner
[board]
(let [num-of-rows (get-number-of-rows board)
...
(defn get-winner
[board]
(let [num-of-rows (int (java.lang.Math/sqrt (count board)))
...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment