Created
October 30, 2010 21:03
-
-
Save angerman/655742 to your computer and use it in GitHub Desktop.
Threading abuse
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
(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