Created
January 2, 2012 01:49
-
-
Save amalloy/1548959 to your computer and use it in GitHub Desktop.
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
(let [valid? (fn [pos] | |
(every? true? | |
;; here we make use of extra-arity map < | |
;; map "expands" like (and (< -1 y h) | |
;; (< -1 x w)) | |
;; with 3+ args, < tests "ascending", so we can pin | |
;; y and x in the range of [0, max). | |
(map < [-1 -1] pos dims))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment