ClojureDocs

导航

命名空间

juxt

clojure.core

自 1.1 起可用 (源代码)
  • (juxt f)
  • (juxt f g)
  • (juxt f g h)
  • (juxt 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)]