In programming language J, is a train of verbs always associative? If it is, Are there any proofs?
Asked
Active
Viewed 223 times
2 Answers
5
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 y f y g h y
. And
((f g) h) y = y (f g) (h y) = y f (g (h y))
which can also be written as y f g h y
.
Those three are completely different things.

Eelvex
- 8,975
- 26
- 42