Hi again Linda, Just noticed that I didn't mention the first expression.
The first expression (ic-:ic2)&> 1j2 0j2 applies > (with rank 0 0 0) to the list of 1j2 0j2 then the & conjunction keeps this rank and transfers it to the ic-:ic2 fork, effectively changing it to rank 0, so each item in the list is processed separately. Hope this helps (and I also hope that I have this right :) ) Cheers, bob On 2013-01-21, at 10:32 PM, bob therriault wrote: > Hi LInda, > > Looks like your second expression is a fork and unless you change the rank it > would have infinite rank by default. 1j2 0j2 would be unboxed and then > applied to ic-:ic2 which is also a fork and would also have infinite rank. > > Cheers, bob > > On 2013-01-21, at 10:28 PM, Linda Alvord wrote: > >> What is the problem here? >> >> (ic-:ic2)&> 1j2 0j2 >> 1 1 >> ([:(ic-:ic2)>) 1j2 0j2 >> 0 >> >> u@v y ↔ u v y Moreover, the monadic uses of u@v and u&v are equivalent. >> >> Linda >> >> -----Original Message----- >> From: [email protected] [mailto:programming- >> [email protected]] On Behalf Of David Ward Lambert >> Sent: Monday, January 21, 2013 10:45 AM >> To: programming >> Subject: Re: [Jprogramming] [Jprogrammingou Hermitian from triangular >> >> Interrupting may be a bad idea. >> >> NB. -------- Use 13 : correctly. >> NB. f=: 13 :',j./&i:/+.y' NB. no. >> NB. f=: 13 : '([: , j./&i:/@+.) y' NB. yes. >> >> ic2 =: [: , j./&i:/@+. >> >> NB. Using a proverb is as if its definition >> NB. were inserted with parenthesis. >> NB. Copy ic2 definition verbatim, >> NB. Surround with parentheses. >> NB. Put in the arguments, then fix quotes. >> >> 13 : '([: , j./&i:/@+.) y' >> [: , j./&i:/@+. >> >> NB. The definition was tacit, >> NB. 13 : returns this tacit verb unchanged >> >> >> >> NB. -------- Equivalence of ic and ic2 >> NB."However, I do not understand how ic and ic2 agree when they don't!" >> >> ic =: [: , ([: i: 9&o.) j./ [: i: 11&o. >> >> ic2 =: [: , j./&i:/@+. >> >> NB. ic and ic2 are identical at rank 0 >> (ic -: ic2)&>1j2 0j2 >> 1 1 >> >> ([: < ic)"0 ] 1j2 0j2 >> +----------------------------------------------------------------+---------- >> ---------+ >> |_1j_2 _1j_1 _1 _1j1 _1j2 0j_2 0j_1 0 0j1 0j2 1j_2 1j_1 1 1j1 1j2|0j_2 >> 0j_1 0 0j1 0j2| >> +----------------------------------------------------------------+---------- >> ---------+ >> ([: < ic2)"0 ] 1j2 0j2 >> +----------------------------------------------------------------+---------- >> ---------+ >> |_1j_2 _1j_1 _1 _1j1 _1j2 0j_2 0j_1 0 0j1 0j2 1j_2 1j_1 1 1j1 1j2|0j_2 >> 0j_1 0 0j1 0j2| >> +----------------------------------------------------------------+---------- >> ---------+ >> >> >> >>> Date: Mon, 21 Jan 2013 03:58:24 -0500 >>> From: "Linda Alvord" <[email protected]> >>> To: <[email protected]> >>> Subject: Re: [Jprogramming] [Jprogrammingou Hermitian from triangular >>> Message-ID: <001d01cdf7b5$78a4cd20$69ee6760$@net> >>> Content-Type: text/plain; charset="koi8-r" >>> >>> Since this has a mistake it is hard to reconstruct what I did wrong. >> This >>> represents what I was doing: >>> >>> >>> >>> ic2=: [: , j./&i:/@+. >>> >>> ic2 >>> >>> [: , j./&i:/@+. >>> >>> ([: , j./&i:/@+.)2 >>> >>> _2 _1 0 1 2 >>> >>> f=: 13 :',j./&i:/+.y' >>> ................ >>> >>> ic 1j2 0j2 >>> >>> _1j_2 _1j_1 _1 _1j1 _1j2 _1j_2 _1j_1 _1 _1j1 _1j2 0j_2 0j_1 0 0j1 0j2 >> 0j_2 >>> 0j_1 0 0j1 0j2 1j_2 1j_1 1 1j1 1j2 1j_2 1j_1 1 1j1 1j2 0j_2 0j_1 0 0j1 >> 0j2 >>> 0j_2 0j_1 0 0j1 0j2 0j_2 0j_1 0 0j1 0j2 0j_2 0j_1 0 0j1 0j2 0j_2 0j_1 0 >> 0j1 >>> 0j2 0j_2 0j_1 0 0j1 0j2 >>> >>> >>> >>> ic2 1j2 0j2 >>> >>> _1j_2 _1j_1 _1 _1j1 _1j2 0j_2 0j_1 0 0j1 0j2 1j_2 1j_1 1 1j1 1j2 0j_2 >> 0j_1 0 >>> 0j1 0j2 0 0 0 0 0 0 0 0 0 0 >>> >>> >>> >>> (ic-:ic2)&>1j2 0j2 >>> >>> 1 1 >>> >>> >>> >>> However, I do not understand how ic and ic2 agree when they don't! >> >> ---------------------------------------------------------------------- >> 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
