Skip to content

Instantly share code, notes, and snippets.

@amalloy
Created January 2, 2012 01:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save amalloy/1548959 to your computer and use it in GitHub Desktop.
Save amalloy/1548959 to your computer and use it in GitHub Desktop.
(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