I hereby claim:
- I am kbaribeau on github.
- I am kbaribeau (https://keybase.io/kbaribeau) on keybase.
- I have a public key whose fingerprint is 6F0A C3A6 C635 CC33 AE73 79C3 E3BE 88EC BB7C E3A8
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
user=> (ns my-ns) | |
nil | |
my-ns=> (defrecord Outfit [shirt pants]) | |
my_ns.Outfit | |
my-ns=> (ns clothes.outfit | |
#_=> (:require [my-ns]) | |
#_=> (:import [my_ns Outfit])); note that we defined it in my-ns, but we have to use an underscore to import it | |
nil | |
clothes.outfit=> (Outfit. "t-shirt" "jeans") | |
#my_ns.Outfit{:shirt "t-shirt", :pants "jeans"} |
def foo | |
s = "something complicated" | |
do_other_stuff | |
s | |
end | |
def bar | |
"something complicated".tap do | |
do_other_stuff | |
end |
(def conn (d/connect "datomic:dev://localhost:4334/seattle")) | |
;44 | |
(d/q '[:find (count ?id) . | |
:in $ ?c | |
:where | |
[?id :community/category ?c]] | |
(d/db conn) | |
"human interest") |
(defmacro bench [f] | |
`(let [start# (System/currentTimeMillis) | |
result# ~f | |
end# (System/currentTimeMillis)] | |
(println (str "bench result: " (- end# start#) "ms")) | |
result#)) | |