术语捕捉函数组合中参数的排序特征
Terminology capturing ordering characteristic of arguments in functional composition
在函数式组合中g compose f
用什么术语来指代和区分函数参数f
和[=]的顺序属性 15=] 传递给组合运算符 compose
?例如,给定以下组合
val reverse = (s: String) => s.reverse
val dropThree = (s: String) => s.drop(3)
(reverse compose dropThree)("Make it so!") // ==> !os ti e: java.lang.String
(dropThree compose reverse)("Make it so!") // ==> ti ekaM: java.lang.String
什么术语使 reverse
在
中 之后出现
reverse compose dropThree
虽然它第一个在
dropThree compose reverse
在 Math SE 他们似乎认为这样精确的术语还没有出现
...I'd aim for an analogy with division or subtraction: you might, for
instance, call the outer function the composer and the inner the
composand. Words like this are not (as far as I know) in common use,
perhaps because the need for them hasn't arisen as often as those for
the elementary arithmetic operations.
然而,在软件工程领域,组合、链接、流水线等似乎无处不在,并且是函数式编程的基础,因此应该存在描述关键顺序的精确术语 属性参与组合的操作数。
注意问题后面的术语具体指的是特定的组合参数,而不是整个表达式,类似于 divisor 和 dividend精确地描述了哪个是哪个分区。
我认为没有任何正式的术语,但我会将 a ∘ b
(λx.a(b(x))
) 表示为
a
和b
的组合
a
与 b
组成
a
合成到 b
a
链接到 b
a
在 b
之后
b
在 a
之前
x
通过 b
和 a
管道化
至于 compose
函数参数的指定,我猜你只剩下 Math.SE 答案了。
在函数式组合中g compose f
用什么术语来指代和区分函数参数f
和[=]的顺序属性 15=] 传递给组合运算符 compose
?例如,给定以下组合
val reverse = (s: String) => s.reverse
val dropThree = (s: String) => s.drop(3)
(reverse compose dropThree)("Make it so!") // ==> !os ti e: java.lang.String
(dropThree compose reverse)("Make it so!") // ==> ti ekaM: java.lang.String
什么术语使 reverse
在
reverse compose dropThree
虽然它第一个在
dropThree compose reverse
在 Math SE 他们似乎认为这样精确的术语还没有出现
...I'd aim for an analogy with division or subtraction: you might, for instance, call the outer function the composer and the inner the composand. Words like this are not (as far as I know) in common use, perhaps because the need for them hasn't arisen as often as those for the elementary arithmetic operations.
然而,在软件工程领域,组合、链接、流水线等似乎无处不在,并且是函数式编程的基础,因此应该存在描述关键顺序的精确术语 属性参与组合的操作数。
注意问题后面的术语具体指的是特定的组合参数,而不是整个表达式,类似于 divisor 和 dividend精确地描述了哪个是哪个分区。
我认为没有任何正式的术语,但我会将 a ∘ b
(λx.a(b(x))
) 表示为
a
和b
的组合
a
与b
组成
a
合成到b
a
链接到b
a
在b
之后
b
在a
之前
x
通过b
和a
管道化
至于 compose
函数参数的指定,我猜你只剩下 Math.SE 答案了。