-> can also be used in conjunction with a well designed DSL to
construct values in a very readable fashion. clj-time has some great
examples of this:


http://seancorfield.github.com/clj-time/doc/clj-time.core.html#var-from-now
(-> 30 minutes from-now)

http://seancorfield.github.com/clj-time/doc/clj-time.core.html#var-ago :
(-> 5 years ago)

Note that this takes advantage of the fact that (-> 30 minutes
from-now) is equivalent to (-> 30 (minutes) (from-now))

t

On Mon, Mar 11, 2013 at 12:29 PM, Fogus <mefo...@gmail.com> wrote:
> I wrote a post about -> and ->> a few years ago that might be helpful.
> http://blog.fogus.me/2009/09/04/understanding-the-clojure-macro/
>
> --
> --
> 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