制作地图或记录规范的方式是否比官方规范指南中的方式更简洁?
(defrecord Person [first-name last-name email phone])
(s/def ::first-name string?)
(s/def ::last-name string?)
(s/def ::email ::email-type)
(s/def ::person (s/keys :req-un [::first-name ::last-name ::email]
:opt-un [::phone]))
Run Code Online (Sandbox Code Playgroud)
理想情况下,如果我能写出像这样的东西会很好
(defrecord Person [first-name last-name email phone])
(s/def ::person (s/keys :req-un [:first-name string?
:last-name string?
:email ::email-type]
:opt-un [:phone]))
Run Code Online (Sandbox Code Playgroud)