Thanks for the explanation. That worked.
On Thu, Jan 9, 2014 at 12:27 PM, Raul Miller <rauldmil...@gmail.com> wrote: > In your ((Y+X)*2) the grammar of your argument to xy matches the > grammar of this sentence: > > ((+++)+2) > > Since this has a noun on the right, J will try to evaluate the > expression before passing it to xy. And if I recall correctly, X is > defined to give a domain error when used without a right argument. So > that is where your domain error comes from. > > You might try changing 2 to 2: or 2"_ (either 2: or 2"_ will address > the grammatical issue which caused execution to not be deferred). > > Thanks, > > -- > Raul > > On Thu, Jan 9, 2014 at 12:13 PM, Joe Bogner <joebog...@gmail.com> wrote: >> Neat, it looks like it would be helpful for beginners to tacit. I may >> have found a bug though or some unexpected behavior to me at least. >> >> addMultiply2=: ((Y + X)*2) xy >> |syntax error: X >> >> These work >> >> add=: (Y + X) xy >> 2 add 3 >> >> 5 >> >> addMultiply=: ((Y + X)*X) xy >> 2 addMultiply 3 >> >> 10 >> >> >> >> >> On Wed, Jan 8, 2014 at 10:14 PM, Raul Miller <rauldmil...@gmail.com> wrote: >>> Michal posted that definition at >>> https://github.com/tangentstorm/tangentlabs/blob/master/j/tacitxy.ijs >>> as he noted in his message. >>> >>> FYI, >>> >>> -- >>> Raul >>> >>> On Wed, Jan 8, 2014 at 10:05 PM, Linda Alvord <lindaalv...@verizon.net> >>> wrote: >>>> What is your defiiniton of xy ? >>>> >>>> f =: (Y * X + Y)xy >>>> 1 2 f 3 4 >>>> |value error: xy >>>> >>>> Linda >>>> >>>> -----Original] Message----- >>>> From: programming-boun...@forums.jsoftware.com >>>> [mailto:programming-boun...@forums.jsoftware.com] On Behalf Of Michal >>>> Wallace >>>> Sent: Tuesday, January 07, 2014 2:15 PM >>>> To: programm...@jsoftware.com >>>> Subject: [Jprogramming] blunt verbs (tacit x and y) >>>> >>>> Hey all, >>>> >>>> I made an adverb ('xy') that lets trains refer to their arguments >>>> explicitly. >>>> >>>> Example: >>>> >>>> f =: (Y * X + Y)xy >>>> 1 2 f 3 4 >>>> 12 24 >>>> >>>> X and Y behave like [ and ], but reference the arguments of the whole >>>> train: >>>> >>>> 0 1 (2: X 3:)xy 4 5 >>>> 0 1 >>>> 0 1 (2: Y 3:)xy 4 5 >>>> 4 5 >>>> >>>> I have no use for it yet, but it was fun to make. :) >>>> >>>> https://github.com/tangentstorm/tangentlabs/blob/master/j/tacitxy.ijs >>>> ---------------------------------------------------------------------- >>>> 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 >> ---------------------------------------------------------------------- >> 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