Domanda

In programming language J, is a train of verbs always associative? If it is, Are there any proofs?

È stato utile?

Soluzione

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.

Altri suggerimenti

Train in J is right associative, and the minimum group is a fork. Only when it cannot make a fork, it makes a hook. So

vvvvv = (vv(vvv)), 

And

vvvv= (v(vvv)).
Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top