Fork me on GitHub
#clojure-spec
<
2018-02-02
>
Alex Miller (Clojure team)00:02:08

I think there is a known issue with swapping gens for aliased specs

Alex Miller (Clojure team)00:02:42

On the phone so can’t easily search JIRA

dominicm17:02:56

Is there a convenience function for:

(s/cat :foo.bar.baz.bosh/title :foo.bar.baz.bosh/title
       :foo.bar.baz.bosh/description :foo.bar.baz.bosh/description)

stathissideris17:02:47

@dominicm cat’s name arguments are non-qualified

stathissideris17:02:08

(s/cat :title :foo.bar.baz.bosh/title
       :description :foo.bar.baz.bosh/description)

stathissideris17:02:28

and with aliases it can be shorter

dominicm17:02:05

@stathissideris But I want to return a namespaced map 😄

stathissideris17:02:28

cat is for sequences!

stathissideris17:02:55

use s/keys instead

dominicm17:02:37

I have a sequence of things, and I want to conveniently conform it into a namespaced map. I'm being lazy.

dominicm17:02:50

I guess the manual way I go (hi ho!)

stathissideris17:02:39

would be a pretty trivial macro…

misha19:02:49

macro all the things!

gklijs21:02:12

Don't need a macro for that, it's pretty easy with some functions to convert data based on a spec to/from a vector.