Attention: the list was moved to
https://github.com/dypsilon/frontend-dev-bookmarks
This page is not maintained anymore, please update your bookmarks.
Attention: the list was moved to
https://github.com/dypsilon/frontend-dev-bookmarks
This page is not maintained anymore, please update your bookmarks.
| (require '[datomic.api :as d]) | |
| (require '[clojure.pprint :refer [pprint]]) | |
| (def uri "datomic:free://localhost:4334/git") | |
| (def conn (d/connect uri)) | |
| (def db (d/db conn)) | |
| ;; committers | |
| (d/q '[:find ?email | |
| :where | |
| [_ :commit/committer ?u] |
| (defmacro test-> | |
| "Takes an expression and a set of test/form pairs. Threads expr (via ->) | |
| through each form for which the corresponding test expression (not threaded) is true." | |
| [expr | |
| & clauses] | |
| (assert (even? (count clauses))) | |
| (let [g (gensym) | |
| pstep (fn [[test step]] `(if ~test (-> ~g ~step) ~g))] | |
| `(let [~g ~expr | |
| ~@(interleave (repeat g) (map pstep (partition 2 clauses)))] |