This file contains hidden or 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
;; (defn full-name ...) is equivalent to: | |
;; (def full-name (fn []...)) which defines a Var | |
;; object called full-name pointing at a compiled function | |
;; returning the static string "Oliv" | |
(defn full-name [] "Oliv") | |
;; greetings is a function taking two args. | |
;; it returns a function of no argument | |
;; invoking the second argument (f) with no arguments | |
;; and combining a string with it. |
This file contains hidden or 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
(ns datomicdemo.core | |
(:require | |
[clojure.edn] | |
[clojure.string :as str] | |
[datomic.api :as d])) | |
(def url "datomic:free://localhost:4334/datomicdemo") | |
(d/create-database url) |
This file contains hidden or 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
;; String containing bulk space(s) | |
(s/def ::bulk-space-string | |
(s/with-gen | |
(s/and string? #(re-find #"\t|\n|\r| +" %)) | |
#(gen/fmap | |
str/join | |
(gen/vector | |
(gen/one-of | |
[(gen/string) |
OlderNewer