Thanks for your fast reply. I have another question: Lets define: distort =: 13 : '-: >: (* <: +: y) * x magic | <: +: y'
Then I get: distort [: -: [: >: ([: * [: <: [: +: ]) * [ magic [: | [: <: [: +: ] It seems to me that there should be a simpler expression for it, which I cannot find. (Of course, I can expand magic inside distort using f. but this is not the point). Moreover, please try this: a =: 0.01 * 1 + i. 99 plot a distort"0 / a Do you see the shape of the curves i am trying to get, with arguments and results in the 0 - 1 range? Maybe you know a better way to obtain these shapes. Thanks. ----- Original Message ----- From: "Marshall Lochbaum" <[email protected]> To: "Programming forum" <[email protected]> Sent: Friday, November 04, 2011 2:13 AM Subject: Re: [Jprogramming] Newbie question >* has rank 0 already, so it isn't necessary. The definition of / is that it > applies the verb with rank (left rank),_ . Essentially, this means that it > loops through all the items of x, then for each of those, all the items of > y, where an "item" is an item with the left rank of the verb. If you try > magic/~ a with magic having rank _ (because it's a fork), you just get (a > magic"_ _"_ _ a), which simply applies magic regularly. > > Marshall > > On Thu, Nov 3, 2011 at 11:57 PM, Ricardo Forno > <[email protected]>wrote: > >> I have this verb: >> magic =: * % >:@(+:@*) - + >> that I use only as a dyad, and, say, >> a =: 0.1 * i. 10 >> If I want to get a table of the * verb, I write: >> a * / a >> If I write >> a magic / a >> I dont get a table. To get a table, I have to write: >> a magic"0 / a >> Why is it so, since both * and magic may be used as dyads? >> Thanks. >> >> >> ---------------------------------------------------------------------- >> For information about J forums see http://www.jsoftware.com/forums.htm >> > ---------------------------------------------------------------------- > For information about J forums see http://www.jsoftware.com/forums.htm > ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm
