bug-apl
[Top][All Lists]
Advanced

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

Re: [Bug-apl] A question.


From: Christian Robert
Subject: Re: [Bug-apl] A question.
Date: Tue, 17 May 2016 23:22:38 -0400
User-agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.1.0

With the explanations from Elias I can now see why ⊣⎕←⍵⊣⎕←⍶⊣⎕←⍹⊣⎕←⍵
is completely out of order. "Twilight Zone" says "you are obsolete", that apply 
to me.

loved this small thread. very instructive.

Xtian.

On 2016-05-17 23:12, Xiao-Yong Jin wrote:

On May 17, 2016, at 9:48 PM, Christian Robert <address@hidden> wrote:

Sorry, no explanations given.

     hook←{⍵⍶⍹⍵}
     +hook÷2
2.5
You can look at the definition
      ∇hook[⎕]∇
    ∇
[0]   λ←(⍶ hook ⍹ ) ⍵
[1]   λ←⍵⍶⍹⍵
    ∇
It’s a definition for an operator receiving two function arguments ⍶ and ⍹, for 
which you can not do ⎕←⍹ or ⎕←⍶.  The result is a monadic function with right 
argument ⍵.  Explicitly for the example,
      +hook÷2
is equivalent to
      2+÷2

     hook←{⍵⍶⍹⍵⊣⎕←⍵⊣⎕←⍶⊣⎕←⍹⊣⎕←⍵}
     +hook÷2
2
DOMAIN ERROR
hook[1]  λ←⍵ ⍶ ⍹ ⍵⊣⎕←⍵⊣⎕←⍶⊣⎕←⍹⊣⎕←⍵
                            ^^
please explain the principle to a newbie.

I really want a working examples.


Xtian.


On 2016-05-17 22:30, Xiao-Yong Jin wrote:
They are for direct function (operator?) definitions.  Try:

     hook←{⍵⍶⍹⍵}
     +hook÷2
2.5

On May 17, 2016, at 8:24 PM, Christian Robert <address@hidden> wrote:

hi,

in the result of "]help" I can see:


    λ       { ... } result
    ⍺       { ... } left value argument
    ⍵       { ... } right value argument
    χ       { ... } axis argument
    ⍶       { ... } left function argument
    ⍹       { ... } right function argument


can someone explain to me the usage of ⍶ and ⍹
with some examples ?

I understant the first four, but not the last two.

many thanks,

Xtian.






reply via email to

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