Henry Rich (10/4/2012) ifany=: ^:(*@#@])
Linda -----Original Message----- From: [email protected] [mailto:[email protected]] On Behalf Of Lippu Esa Sent: Friday, October 05, 2012 11:38 AM TKo: '[email protected]' Subject: Re: [Jprogramming] Why the length error? Hi Rick, sorry about the dumb question: where is ifany defined? BTW - I came up with the exactly same solution as you. Esa -----Original Message----- From: [email protected] [mailto:[email protected]] On Behalf Of Ric Sherlock Sent: 5. lokakuuta 2012 5:49 To: [email protected] Subject: Re: [Jprogramming] Why the length error? Raul has already shown how to use under but here is my original one using it too: rad=: (#~ [: -. 0 , 2 -:/\ ])&.|: :: ] However I like the ifany approach better in this case rad=: (#~ [: -. 0 , 2 -:/\ ])&.|: ifany rad B The reason that ( ifany B ) gives a syntax error is because ifany is an adverb not a verb and therefore expects a verb to its left. type 'ifany' ┌──────┐ │adverb│ └──────┘ You will get the same error if you execute ( / B ) On Fri, Oct 5, 2012 at 12:44 PM, Linda Alvord <[email protected]> wrote: > > Ric, Is there a way to modify your function so the result of rad B > will > be: > > 3 5 4 > 2 1 6 > > Linda ---------------------------------------------------------------------- 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
