简体   繁体   English

是J联合列车

[英]Is a train in J associative

In programming language J, is a train of verbs always associative? 在编程语言J中,一串动词总是联想到的吗? If it is, Are there any proofs? 如果是的话,有没有证据?

No, a train of verbs is not associative and this follows the definitions. 不,一系列动词不是关联的,这遵循定义。 For example, a fork is 例如,一个分叉是

(f g h) y = (f y) g (h y)

but

(f (g h)) y = y f ((g h) y) = y f (y g (h y))

which can also be written as yfyghy . 也可以写成yfyghy And

((f g) h) y = y (f g) (h y) = y f (g (h y))

which can also be written as yfghy . 也可以写成yfghy

Those three are completely different things. 这三个是完全不同的东西。

Train in J is right associative , and the minimum group is a fork . J中的列车是right associative ,最小的组是fork Only when it cannot make a fork, it makes a hook. 只有当它不能制作一个叉子时,它才会成为一个钩子。 So 所以

vvvvv = (vv(vvv)), 

And

vvvv= (v(vvv)).

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM