Skip to content

Instantly share code, notes, and snippets.

View brabster's full-sized avatar

Paul Brabban brabster

View GitHub Profile
@borkdude
borkdude / specfn.clj
Last active January 7, 2022 13:34
Use a spec for defining function arguments and get validation automatically
(ns specfn.core
(:require [clojure.spec :as s]
[clojure.spec.test :as t]))
(defn- spec-symbols [s]
(->> s
(drop 1)
(partition-all 2)
(map first)
(map name)