为什么juxt以juxtaposition命名?

问题描述 投票:0回答:1

为什么 Clojure 的 juxt 以并置命名?我看不出并列的是什么。这与具有直观命名的

partial
comp
形成对比。

clojure functional-programming lisp function-composition
1个回答
3
投票

哦,我现在明白了。每个函数都使用相同的参数进行计算并保存以进行比较,即并置。 来自文档

((juxt a b c) x) => [(a x) (b x) (c x)]
© www.soinside.com 2019 - 2024. All rights reserved.