Fork me on GitHub
#specter
<
2020-08-18
>
Vincent Cantin17:08:46

Assuming that we have a vector of hashmaps containing addresses, how to use specter to group them by :country, then by :city ? (I could do it without specter, but I am curious)

isak18:08:26

(specter/select [(specter/transformed [] (partial group-by :country))
                   (specter/transformed [specter/MAP-VALS] (partial group-by :city))]
                  addresses)

isak18:08:45

(i'm kind of new, so maybe there is a smarter way)

Vincent Cantin13:08:31

I noticed the s/view that could be used instead of s/transformed