Here's a way to avoid &
to2=: 13 :'((i.y)-.i.x),y'
7 to2 11
7 8 9 10 11
to2
] ,~ ([: i. ]) -. [: i. [
Linda
-----Original Message-----
From: Programming <[email protected]> On Behalf Of
Thomas Bulka
Sent: Saturday, June 29, 2019 3:20 PM
To: [email protected]
Subject: Re: [Jprogramming] Difficulties understanding a sentence with the
compose-conjunction
Am 29.06.2019 20:45 schrieb Clifford Reiter:
> Do these experiments help?
>
> to =: -.&i.~,]
>
> 3 to 5
>
> 3 4 5
>
> 3 -.&i.~ 5
>
> 3 4
>
> 5 -.&i. 3
>
> 3 4
>
> (i.5)-.(i.3)
>
> 3 4
Hello Clifford,
thank you very much for your quick reply! By working through your examples, I
got a better understanding, I think. Probably my description is
terminologically weak, but now I would describe my understanding of the
to-sentence like this:
1. The i~ is used to generate the vectors (i. y) and (i. x).
2. The less-primitive is used to remove (i. x) from (i. y), giving a result of
x..y-1.
3. Finally the ,] is applied to add the upper limit, provided as the parameter
y, to the result.
Is this, what the to-sentence is supposed to do?
Kind regards,
Thomas
----------------------------------------------------------------------
For information about J forums see
https://eur04.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.jsoftware.com%2Fforums.htm&data=02%7C01%7C%7Ccafd7e3f55b1468e3a5e08d6fcc6d319%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C636974328207341485&sdata=5xmKf4QkbWPwZ%2F%2Byp4i2e%2FY%2BPq%2FwiaYhWGhClQSpFCE%3D&reserved=0
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm