On Thu, Nov 21, 2013 at 4:08 AM, Zhemin Lin <lin.zhe...@gmail.com> wrote: > Hi. > I'm quite annoyed by the ugly smell of (first (vals (first ... )). Is there > any better way to do it? > > user=> (-> {:key1 {:cf {:cq "0,1,2,3"}}} vals first vals first vals first > (clojure.string/split #",")) > ["0" "1" "2" "3"]
I think you want get-in: (-> {:key1 {:cf {:cq "0,1,2,3"}}} (get-in [:key1 :cf :cq]) (clojure.string/split #",")) -John -- -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en --- You received this message because you are subscribed to the Google Groups "Clojure" group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.