bug-apl
[Top][All Lists]
Advanced

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

Re: [Bug-apl] An other question about "⍶"


From: Juergen Sauermann
Subject: Re: [Bug-apl] An other question about "⍶"
Date: Thu, 19 May 2016 16:04:12 +0200
User-agent: Mozilla/5.0 (X11; Linux i686; rv:31.0) Gecko/20100101 Thunderbird/31.4.0

Hi Christian,

correct. In GNU APL you cannot use values in defined operators where functions are expected,
except for very few primitive operators.

A work-around for a third value in lambdas is to use the axis χ instead of function :

      FOO ← { ⍺ χ ⍵ }
      1 FOO[2] 3
1 2 3


/// Jürgen


On 05/18/2016 09:59 PM, Christian Robert wrote:
Looking at

 https://www.youtube.com/watch?v=DmT80OseAGs


Every thing goes fine (when he says "take" and use "⊃" you write "↑" instead in gnuapl)

[...]

      88 {⍺ ⍵} s44
88 ┌→──────┐
   ↓0 0 0 0│
   │0 0 2 1│
   │3 0 0 4│
   │0 0 0 0│
   └───────┘


at the minute 03:41 it fail with a syntax error

      88 (3 2 {⍺ ⍶ ⍵}) s44
SYNTAX ERROR
      88(3 2 λ1)s44
      ^         ^

Does this means that in gnuapl "⍶" cannot be data ? (ie: *must* be a function)


Xtian.


reply via email to

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