Skip to content

Instantly share code, notes, and snippets.

View lensgolda's full-sized avatar

Lens lensgolda

View GitHub Profile
@conan
conan / url-gen.clj
Created October 4, 2017 14:13
Clojure.spec URL and email specs with generators
(require '[cemerick.url :as url]
'[clojure.spec.alpha :as s]
'[clojure.spec.gen.alpha :as gen]
'[clojure.string :as string])
(def non-empty-string-alphanumeric
"Generator for non-empty alphanumeric strings"
(gen/such-that #(not= "" %)
(gen/string-alphanumeric)))