2013/3/12 Marko Topolnik <marko.topol...@gmail.com>

> On Monday, March 11, 2013 11:51:17 PM UTC+1, Sean Corfield wrote:
>
>> In addition to clj-time, I tend to use -> with date-clj as well:
>>
>> (-> (today)
>>     (subtract 30 :days))
>>
>> And I find something like this:
>>
>>         (->> (-> response :body :postalCodes)
>>              (map to-location) (sort-by :city))
>>
>> much easier to read than:
>>
>>     (sort-by :city (map to-location (:postalCodes (:body response))))
>>
>
> In Clojure 1.5 I would write
>
> (as-> response x (:body x) (:postalCodes x) (map to-location x) (sort-by
> :city x))
>
> or, perhaps
>
> (as-> response x (-> x :body :postalCodes) (->> x (map to-location)
> (sort-by :city))
>

or perhaps

(-> response :body :postalCodes (->> (map to-location) (sort-by :city)))

:-)


>
> I *love *as->* *!
>
> YMMV tho'...
>>
>
> Ditto :)
>
>  --
> --
> 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.
>
>
>

-- 
-- 
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.


Reply via email to