h =: (+/ % #) , [: *: +: h 1 2 3 2 4 16 36 --Kip
On Friday, April 17, 2015, Linda Alvord <lindaalv...@verizon.net> wrote: > Thanks David. With your explanation I could get the same result without @: > > f=: 13 :' ((+/ % #) , *:@:+:)y' > f 1 2 3 > 2 4 16 36 > > g=: 13 :' (+/y % # y) , *:+:y' > g 1 2 3 > 2 4 16 36 > > f > (+/ % #) , *:@:+: > g > ([: +/ ] % #) , [: *: +: > > Linda > > -----Original Message----- > From: programming-boun...@forums.jsoftware.com <javascript:;> > [mailto:programming-boun...@forums.jsoftware.com <javascript:;>] On > Behalf Of David Lambert > Sent: Thursday, April 16, 2015 7:26 AM > To: programming > Subject: Re: [Jprogramming] Verb to string and Verb array > > The conjunction @: turns u@:v into a single verb whereas u v alone > represent > 2 verbs. Sticking @: into a train converts a hook into a fork, a fork into > an hook, and changes verb valence. Let's examine your A and B proverbs. > > with_at=:(+/ % #) , *:@:+: > sans_at=:(+/ % #) , *: +: > with_at > (+/ % #) , *:@:+: > sans_at > (+/ % #) (, *: +:) > > > Wow! > The with_at case guarantees squaring, the monadic definition of *: . > Without @: the *: appears as an even verb of a fork, hence dyadic, which is > "not and" with Boolean domain. Thus domain error. > > > Date: Thu, 16 Apr 2015 05:19:09 -0400 > > From: "Linda Alvord"<lindaalv...@verizon.net <javascript:;>> > > To:<programm...@jsoftware.com <javascript:;>> > > Subject: Re: [Jprogramming] Verb to string and Verb array > > Message-ID:<000c01d07826$68500770$38f01650$@verizon.net> > > Content-Type: text/plain; charset=utf-8 > > > > Why is @: necessary? > > > > (1 {A=:(+/ % #) , *:@:+:) 1 2 3 > > 4 > > A > > (+/ % #) , *:@:+: > > A 1 2 3 > > 2 4 16 36 > > > > > > (1 {B=:(+/ % #) , *:+:) 1 2 3 > > |domain error > > | (1{B=:(+/%#),*:+:)1 2 3 > > B > > (+/ % #) (, *: +:) > > > > 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 > -- Sent from Gmail Mobile ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm