open:spec-cat

spec/cat

cat “concatenate” sequence items (first this, then that)

(s/conform (s/cat :num number?, :key keyword?) [5 :b])
;;=> {:num 5, :key :b}

Each item gets a name
The conformed result is a map that can easily be consumed with Clojure's destructuring

  • open/spec-cat.txt
  • Last modified: 2024/10/05 06:15
  • by 127.0.0.1