clojureclojure.spec


Syntax

  • :: is a shorthand a namespace-qualified keyword. E.g. if we are in the namespace user: ::foo is a shorthand for :user/foo
  • #: or # - map-literal syntax for qualifying keys in a map by a namespace

Remarks

Clojure spec is a new specification/contracts library for clojure available as of version 1.9.

Specs are leveraged in a number of ways including being included in documentation, data validation, generating data for testing and more.