Created
December 12, 2012 16:05
-
-
Save fredyr/4269003 to your computer and use it in GitHub Desktop.
Find sub-squares from a sudoku board
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
(defn get-squares [cells] | |
(let [p (partition 3 cells) | |
q (for [x [0 1 2]] (drop x p))] | |
r (map #(take-nth 3 %) q) | |
(partition 9 (flatten r)))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment