Many 4 will run ranks 4 times: many=: 13 :'".(y,7)$''ranks A''' many [: ". 'ranks A' $~ 7 ,~ ] ;:'[: ". ''ranks A'' $~ 7 ,~ ]' ┌──┬──┬─────────┬─┬─┬─┬─┬─┬─┐ │[:│".│'ranks A'│$│~│7│,│~│]│ └──┴──┴─────────┴─┴─┴─┴─┴─┴─┘ Is it true when you read a tacit J verb in "words" that Cap [: is to the left of a verb, it will mean the verb to it its right will be run monadically? In this case ". is a monad.
If not, can you give an example Where it is not true. Thanks in advance. Linda -----Original Message----- From: Programming <programming-boun...@forums.jsoftware.com> On Behalf Of Linda Alvord Sent: Friday, October 5, 2018 4:48 AM To: programm...@jsoftware.com Subject: Re: [Jprogramming] Using rank to avoid looping - reference? Now ranks is a verb. A=:'ABCDEFFGHIJKLMNOPSSTUVXYZ' ranks=: 13 :'(((<B);<<"(C)B),:(<''noun rank''),<''verb rank''),(#$B);<C=.?>:#$B=:(?4 5 6)$y' ranks A ┌─────────┬─────────┐ │┌┐ │┌┐ │ │││ │││ │ │││ │││ │ │││ │││ │ │││ │││ │ │││ │││ │ │└┘ │└┘ │ ├─────────┼─────────┤ │noun rank│verb rank│ ├─────────┼─────────┤ │3 │3 │ └─────────┴─────────┘ $B 2 2 0 ranks A ┌─────────┬─────────┐ │┌───┐ │ │ │└───┘ │ │ ├─────────┼─────────┤ │noun rank│verb rank│ ├─────────┼─────────┤ │3 │1 │ └─────────┴─────────┘ $B 0 3 3 ranks A ┌─────────┬─────────────┐ │┌─────┐ │┌─────┬─────┐│ ││ABCDE│ ││ABCDE│FFGHI││ ││FFGHI│ │├─────┼─────┤│ ││ │ ││JKLMN│OPSST││ ││JKLMN│ │└─────┴─────┘│ ││OPSST│ │ │ │└─────┘ │ │ ├─────────┼─────────────┤ │noun rank│verb rank │ ├─────────┼─────────────┤ │3 │1 │ └─────────┴─────────────┘ $B 2 2 5 Try the 4th deimension with B=:4 5 6 7 Can you define a verb to run rank A n times? Linda -----Original Message----- From: Programming <programming-boun...@forums.jsoftware.com> On Behalf Of Linda Alvord Sent: Tuesday, September 25, 2018 10:37 PM To: programm...@jsoftware.com Subject: Re: [Jprogramming] Using rank to avoid looping - reference? I think the problelems are worked out. NB. Random rank noun B NB. and dom rank verb b ox A=:'ABCDEFFGHIJKLMNOPSSTUVXYZ' B=:(>:?(?4)#4)$A D=:<"(C=:?>:#$B)B (((<B);<D),:(<'noun rank'),<'verb rank'),(#$B);<C ┌─────────┬─────────────────────┐ │┌────┐ │┌────┬────┬────┬────┐│ ││ABCD│ ││ABCD│EFFG│HIJK│LMNO││ ││EFFG│ │├────┼────┼────┼────┤│ ││HIJK│ ││PSST│UVXY│ZABC│DEFF││ ││LMNO│ │├────┼────┼────┼────┤│ ││ │ ││GHIJ│KLMN│OPSS│TUVX││ ││PSST│ │└────┴────┴────┴────┘│ ││UVXY│ │ │ ││ZABC│ │ │ ││DEFF│ │ │ ││ │ │ │ ││GHIJ│ │ │ ││KLMN│ │ │ ││OPSS│ │ │ ││TUVX│ │ │ │└────┘ │ │ ├─────────┼─────────────────────┤ │noun rank│verb rank │ ├─────────┼─────────────────────┤ │3 │1 │ └─────────┴─────────────────────┘ $B 3 4 4 Here's anotherer result. ┌─────────┬─────────┐ │┌───┐ │┌─┬─┬─┐ │ ││ABC│ ││A│B│C│ │ ││DEF│ │├─┼─┼─┤ │ ││FGH│ ││D│E│F│ │ │└───┘ │├─┼─┼─┤ │ │ ││F│G│H│ │ │ │└─┴─┴─┘ │ ├─────────┼─────────┤ │noun rank│verb rank│ ├─────────┼─────────┤ │2 │0 │ └─────────┴─────────┘ $B 3 3 Linda -----Original Message----- From: Programming <programming-boun...@forums.jsoftware.com> On Behalf Of Linda Alvord Sent: Sunday, September 23, 2018 8:43 PM To: programm...@jsoftware.com Subject: Re: [Jprogramming] Using rank to avoid looping - reference? Why not include these? #$F=:' ' 0 #$G=:'A' 0 <"0 F ┌─┐ │ │ └─┘ <"0 G ┌─┐ │A│ └─┘ Maybe A=:' ABC... But that might be messy. Linda Sent from my Verizon, Samsung Galaxy smartphone -------- Original message -------- From: David Lambert <b49p23t...@gmail.com> Date: 9/23/18 7:55 PM (GMT-05:00) To: programming <programm...@jsoftware.com> Subject: Re: [Jprogramming] Using rank to avoid looping - reference? err, yes and rank =: # @: $ DATA =: 'ABCDEFFGHIJKLMNOPSSTUVXYZ' SHAPE =: >: ? 3 # 5 NB. zeros aren't beneficial to this demonstration A =: SHAPE $ DATA NB. A is a rank 3 array of random shape ITEM_RANK =: ? >: rank A (;:'array items') , ( (< A) ; ( < <"ITEM_RANK A) ) , ( SHAPE ; ITEM_RANK ) On 09/23/2018 07:19 PM, David Lambert wrote: > > DATA =: 'ABCDEFFGHIJKLMNOPSSTUVXYZ' > SHAPE =: >: ? 3 # 5 NB. zeros aren't beneficial to this demonstration > A =: SHAPE $ DATA NB. A is a rank 3 array of random shape > ITEM_RANK =: ? >: rank A > (;:'array items') , ( (< A) ; ( < <"ITEM_RANK A) ) , ( SHAPE ; > ITEM_RANK ) > > ---------------------------------------------------------------------- For information about J forums see https://nam01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.jsoftware.com%2Fforums.htm&data=02%7C01%7C%7Cad00920017b4406e6b7b08d62a9f4b56%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C636743260980911729&sdata=62X%2FN8QzNkpyTDuUEMam1Upwdt%2B0hdfh9YO6YTx44K4%3D&reserved=0 ---------------------------------------------------------------------- For information about J forums see https://nam01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.jsoftware.com%2Fforums.htm&data=02%7C01%7C%7Cad00920017b4406e6b7b08d62a9f4b56%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C636743260980911729&sdata=62X%2FN8QzNkpyTDuUEMam1Upwdt%2B0hdfh9YO6YTx44K4%3D&reserved=0 ---------------------------------------------------------------------- For information about J forums see https://nam01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.jsoftware.com%2Fforums.htm&data=02%7C01%7C%7Cad00920017b4406e6b7b08d62a9f4b56%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C636743260980911729&sdata=62X%2FN8QzNkpyTDuUEMam1Upwdt%2B0hdfh9YO6YTx44K4%3D&reserved=0 ---------------------------------------------------------------------- For information about J forums see https://nam01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.jsoftware.com%2Fforums.htm&data=02%7C01%7C%7Cad00920017b4406e6b7b08d62a9f4b56%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C636743260980911729&sdata=62X%2FN8QzNkpyTDuUEMam1Upwdt%2B0hdfh9YO6YTx44K4%3D&reserved=0 ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm