0
Fork 0
mirror of https://github.com/penpot/penpot.git synced 2025-02-12 18:18:24 -05:00

Add valid? predicate that prints debug info to stdout.

When the predicate fails. Very usefull when used with preconditions
that by default does not print nothing.
This commit is contained in:
Andrey Antukh 2016-11-20 21:21:02 +01:00
parent 4eab2f81cf
commit 5165ac6e52
No known key found for this signature in database
GPG key ID: 4DFEBCB8316A8B95

View file

@ -31,6 +31,12 @@
:context (s/explain-data spec data))
result)))
(defn valid?
[spec data]
(if (s/valid? spec data)
true
(s/explain spec data)))
;; --- Predicates
(defn email?