Skip to content

Instantly share code, notes, and snippets.

@angerman
Created October 30, 2010 21:03
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 angerman/655742 to your computer and use it in GitHub Desktop.
Save angerman/655742 to your computer and use it in GitHub Desktop.
Threading abuse
(defmacro -< [x & forms] (vec (for [form forms] `(-> ~x ~@form))))
(defmacro -<< [x & forms] (vec (for [form forms] `(->> ~x ~@form))))
(defmacro >- [form fn] `(apply ~fn ~form))
(->
(map
(fn [x]
(->
(map #(->
(-< (-> % inc load-sample-character (scale :height *H*))
[identity]
[blur freq-table smooth-hist2 combined-thresh-finder])
(>- thresh-at))
(range (* x 12) (* (inc x) 12)))
hstack))
(range 18))
vstack
scrollable
display)
;; this is the output: http://skitch.com/angerman/d6y3y/untitled
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment