Thomas I think where your error is is in step 2 to step 3. Your linear description describes a composition of verbs that is different than the form of the 'to' verb actually is.
It might be helpful to see the 'to' verb with a bunch of extra spaces (this is still syntactically correct): to =: -.&i.~ , ] When you see this, you should think of the concept of a fork (more specifically a dyadic fork). See the following for an explanation: https://www.jsoftware.com/help/learning/09.htm Forks don't consume their inputs in the 'linear' way you are describing in s1 through s4 but rather through an 'interleaved' way. Hint, the comma you thought was 'ravel' is actually 'append'. Hope this helps. On Sat, Jun 29, 2019 at 2:30 PM Thomas Bulka <thomas.bu...@posteo.de> wrote: > Hello everyone, > > I stumbled across another understanding problem during my efforts to > learn J. I do currently struggle with a sentence defined in the essay "A > Composition on Composition": > > https://code.jsoftware.com/wiki/Fifty_Shades_of_J/Chapter_2 > > In this essay the sentence "to" is defined like this: > > to =: -.&i.~,] > > It works as expected and generates a list of integers from x to y > (dyadic use). I do unterstand (I think) the use of the &-conjunction in > this sentence, but what I don't get is the i.~,]-part. My (obviously > wrong) interpretation goes like this - (s[n] denotes my assumption on > the different steps of evaluation when called with, say, 12 as the > y-parameter): > > s1 =: i.~,] > s2 =: i.~,12 NB. ] denotes the y-parameter > s3 =: i.~12 NB. Now y is raveled > s4 =: 12 i. 12 NB. By using ~ 12 is the x- and y-parameter of i > > The result of the final step would be zero (according to my > understanding), but explicitly calling "s1 12" gives the result 0 12. > Neither do I understand that result, nor do I understand, how this > contributes to the to-sentence defined above. As you can see, I'm > totally lost here and would very much appreciate any explanation on how > to interpret that sentence correctly. > > Please excuse the lengthy description of my misunderstanding, but I > tried to describe my train of thought to make as clear as possible, > where my difficulties in understanding are. > > Thank you very much in advance! > > Kind regards, > > Thomas > > ---------------------------------------------------------------------- > For information about J forums see http://www.jsoftware.com/forums.htm > ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm