[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Bug-apl] Scan operator has strange behaviour
From: |
Jay Foad |
Subject: |
Re: [Bug-apl] Scan operator has strange behaviour |
Date: |
Fri, 21 Mar 2014 13:45:38 +0000 |
On 21 March 2014 13:39, Elias Mårtenson <address@hidden> wrote:
> On 21 March 2014 19:55, Jay Foad <address@hidden> 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.