Skip to content

Instantly share code, notes, and snippets.

@jollm
Created March 13, 2011 02:48
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 jollm/867824 to your computer and use it in GitHub Desktop.
Save jollm/867824 to your computer and use it in GitHub Desktop.
(defspec
rect
"Rectangular region"
[format
:nbits (5 bits)
(let [coord (:nbits bits)]
(for [k [:xmin :xmax :ymin :ymax]]
[k coord]))]
[rules
:nbits unsigned
(for [k [:xmin :xmax :ymin :ymax]]
[k signed])])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment