bug-apl
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Bug-apl] Rank operator and function assignment


From: Juergen Sauermann
Subject: Re: [Bug-apl] Rank operator and function assignment
Date: Sun, 09 Mar 2014 13:52:22 +0100
User-agent: Mozilla/5.0 (X11; Linux i686; rv:17.0) Gecko/20130330 Thunderbird/17.0.5

Hi,

actually the example below works if you set the parentheses differently:

      {'foo', ⍵}⍤1 (4 5⍴⍳10)
foo 1 2 3 4  5
foo 6 7 8 9 10
foo 1 2 3 4  5
foo 6 7 8 9 10


The reason why your example below does not work is that your parentheses force {'foo',⍵}⍤1 to be computed first (throwing the rank error because of argument 1
which is expected to be a vector).

/// Jürgen


On 03/04/2014 07:52 PM, Daniel H. Leidisch wrote:
Hello!

Juergen Sauermann
<address@hidden> writes:

What you probably intended to do is:

*      {'foo',⍵}⍤1 (4 5⍴⍳10)*
foo 1 2 3 4  5
foo 6 7 8 9 10
foo 1 2 3 4  5
foo 6 7 8 9 10
Shouldn't this work, too?

       ({'foo',⍵}⍤1) 4 5⍴⍳10
RANK ERROR
       (λ1⍤1)4 5⍴⍳10
        ^        ^

Works in NARS2000.


Regards,

Daniel







reply via email to

[Prev in Thread] Current Thread [Next in Thread]