Created
February 10, 2017 22:26
-
-
Save brandonbloom/5d89fe87cb6fe34844423f9e88939085 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(s/def ::m1 (s/keys :req [::a ::b])) | |
(s/def ::a int?) | |
(s/def ::b int?) | |
(s/def ::x int?) | |
(s/def ::y int?) | |
(s/def ::ab (s/keys :req [::a ::b])) | |
(s/def ::xy (s/keys :req [::x ::y])) | |
(s/def ::m (s/merge ::ab (s/nilable ::xy))) | |
(s/exercise ::m) | |
(set (map (comp vec keys first) (s/exercise ::m))) | |
;; actual => #{[:user/a :user/b :user/x :user/y]} | |
;; expected => #{[:user/a :user/b] | |
;; [:user/a :user/b :user/x :user/y]} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment