[Jprogramming] Tabulation not working over user defined verb (fork)
Viktor Cerovski
viktor.cerovski at gmail.com
Tue Feb 7 19:09:12 HKT 2012
Alex Giannakopoulos wrote:
>
> Thanks everybody.
> I knew it had something to do with the fork, but I hadn't realised that
> verb trains themselves have rank!
>
Every verb has ranks. Ranks of forks are _, which means
that they apply to the whole argument.
You can make the table also just by changing rank of your verb:
cf =. ^<^~
cf"0 1~ i.10
0 1 1 1 1 1 1 1 1 1
0 0 1 1 1 1 1 1 1 1
0 0 0 1 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0
0 0 0 1 0 0 0 0 0 0
0 0 1 1 1 0 0 0 0 0
0 0 1 1 1 1 0 0 0 0
0 0 1 1 1 1 1 0 0 0
0 0 1 1 1 1 1 1 0 0
0 0 1 1 1 1 1 1 1 0
>
> On 3 February 2012 16:37, Linda Alvord <lindaalvord at verizon.net> wrote:
>
>> Also:
>>
>> (i.10) cf"0/ i.10
>> 0 1 1 1 1 1 1 1 1 1
>> 0 0 1 1 1 1 1 1 1 1
>> 0 0 0 1 0 0 0 0 0 0
>> 0 0 0 0 0 0 0 0 0 0
>> 0 0 0 1 0 0 0 0 0 0
>> 0 0 1 1 1 0 0 0 0 0
>> 0 0 1 1 1 1 0 0 0 0
>> 0 0 1 1 1 1 1 0 0 0
>> 0 0 1 1 1 1 1 1 0 0
>> 0 0 1 1 1 1 1 1 1 0
>>
>> Linda
>>
>> -----Original Message-----
>> From: programming-bounces at jsoftware.com
>> [mailto:programming-bounces at jsoftware.com] On Behalf Of Alex
>> Giannakopoulos
>> Sent: Friday, February 03, 2012 7:02 AM
>> To: Programming forum
>> Subject: [Jprogramming] Tabulation not working over user defined verb
>> (fork)
>>
>> Suppose I have the following:
>>
>> cf =. ^<^~
>> (i.10) cf / i.10
>> 0 0 0 0 0 0 0 0 0 0
>>
>> What gives? SHould I not be getting a table?
>> How can I fix it so that I do get a table?
>> ----------------------------------------------------------------------
>> 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
>
>
--
View this message in context: http://old.nabble.com/Tabulation-not-working-over-user-defined-verb-%28fork%29-tp33256334s24193p33277892.html
Sent from the J Programming mailing list archive at Nabble.com.
More information about the Programming
mailing list