Search code examples
clojurefunctional-programminglispfunction-composition

why is juxt named after juxtaposition?


Why is Clojure's juxt named after juxtaposition? I don't see what is being juxtaposed. This is in contrast to partial and comp which have intuitive naming.


Solution

  • Oh, I see it now. Each of the functions is evaluated with the same argument and saved for comparison, i.e. juxtaposition. From the documentation:

    ((juxt a b c) x) => [(a x) (b x) (c x)]