I don't use juxt much, but the example that I did pick up is where juxt is 
used for sorting on one function first, and in the case of a tie, on the 
second function. That is quite useful to me.

> 
(sort-by (juxt first second) (map vector (repeatedly 10 #(rand-int 3)) (shuffle 
(range 10))))
([0 1] [0 4] [0 5] [0 6] [0 7] [0 8] [1 2] [1 3] [2 0] [2 9])

On Sunday, July 16, 2017 at 5:52:44 AM UTC+2, lawrence...@gmail.com wrote:
>
>
>
> Does anyone use juxt in the real world, or is mostly for examples? 
>
>
>
 

-- 
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/d/optout.

Reply via email to