Skip to content

clojure.core/juxt

View this page on ClojureDocs

Type: function Added: Clojure 1.1 Examples: 12 Runnable: 7
([f] [f g] [f g h] [f g h & fs])

Takes a set of functions and returns a fn that is the juxtaposition of those fns. The returned fn takes a variable number of args, and returns a vector containing the result of applying each fn to the args (left-to-right). ((juxt a b c) x) => [(a x) (b x) (c x)]

Examples

by kotarak on
by kotarak on . May have evaluation errors.
by adie on
by ordnungswidrig on
by Phalphalak on
by d9k on
by frolovv on
by clojurianix on
by sleyzerzon on . May have evaluation errors.
by lmccombes on . May have evaluation errors.
by smnplk on . May have evaluation errors.
by AbhishekJaiswal123 on . May have evaluation errors.

Note by Nevena

I kinda love this fn =)

Note by lispro06

"reduce1" -> "reduce"

core sources from 33 line to 37 line

See also


Content from the matching ClojureDocs page, with authors credited on each contribution.