`(~(symbol (name (first body))) ~@(pieces 0))
`(~(symbol (name (first body))) ~@(pieces 0) (pipeline ~@(pieces 1)))))
+;; This one is from http://richhickey.github.com/clojure/clojure.core-api.html
+;; I'm not sure why I don't have it
+ "Threads the expr through the forms. Inserts x as the
+ last item in the first form, making a list of it if it is not a
+ list already. If there are more forms, inserts the first form as the
+ last item in second form, etc."
+ ([x form] (if (seq? form)
+ (with-meta `(~(first form) ~@(next form) ~x) (meta form))
+ ([x form & more] `(->> (->> ~x ~form) ~@more)))
:map #(list (totient %) %)
+(defn min-permuted-totient-quotient [n]
+ (map #(list (totient %) %))
+ (filter #(= (sort (to-digits (first %)))
+ (sort (to-digits (frest %)))))
+ (map #(list (/ (frest %) (first %)) (frest %)))
+;; (min-permuted-totient-quotient 10000)
;; (time (min-permuted-totient-quotient 10000000))
;; "Elapsed time: 513006.925 msecs"
;; (comp f g h) -> f(g(h(*)))
+;; This is perhaps a similar problem.
+;; The + is the point that is not colored. I got this grid by trying to add a
+;; row to a 4-coloring of a 16x17 grid.