Conform
Does a value conform to a specification?λ︎
clojure.spec.alpha/conform
takes two arguments
- a specification
- a value to test against the specification
:clojure.spec.alpha/invalid
is returned when a value does not conform to a specification.
If the value does conform to the specification, then the value is returned. This value is referred to as a conformed value.
Require the Clojure spec libraryλ︎
Set the namespace for the page and require clojure.spec.alpha library, setting the alias to spec
Using conformλ︎
If the value conforms to the spec, a conformed value is returned
When a value does not conform to a spec, the value :clojure.spec.alpha/invalid
is returned