On 21 March 2014 13:39, Elias Mårtenson <loke...@gmail.com> wrote: > On 21 March 2014 19:55, Jay Foad <jay.f...@gmail.com> wrote: >> Associativity matters because the last item of the result is 3>1>2, >> which means 3>(1>2). But your explanation would lead to (3>1)>2 as the >> last item. > > > You are right, but that can be addressed by defining my solution to simply > evaluate the pairs from the right.
The items of the result of f\A B C D ... are: A A f B A f (B f C) A f (B f (C f D)) ... If f is not associative, then knowing the Nth item of the result is of no use when calculating the (N+1)th item. Jay.