The juxt function is one of my favorites. It returns a function that lets you run many functions against the same parameters and returns the results as a vector.
((juxt inc dec even? odd? -) 1)=> [2 0 false true -1]
https://clojuredocs.org/clojure.core/juxt
@tomheyes
How about
((apply juxt [:foo :baz]) {:foo 2 :bar 3 :baz 4}=> [2 4]
A really nice way to extract values from a map, especially nice if one is operating on a sequence of maps.
QOTO: Question Others to Teach Ourselves An inclusive, Academic Freedom, instance All cultures welcome. Hate speech and harassment strictly forbidden.
@tomheyes
How about
((apply juxt [:foo :baz]) {:foo 2 :bar 3 :baz 4}
=> [2 4]
A really nice way to extract values from a map, especially nice if one is operating on a sequence of maps.