Please do not ignore rank when reading the vocabulary.

For example:  http://www.jsoftware.com/help/dictionary/d630v.htm says
that the rank of the derived verb is mv mv mv

This means that the monad rank of verb v will be used for all verb
ranks of a verb derived using &

So, for the example #&> the verb v will be > and the monad rank of
this verb is 0 so when considering equivalent definitions you must
retain that rank.  You can either use an explicit declaration "0 0 0
or "0 or you can constrain your examples so that you only present rank
0 nouns to your example code.

In any event, you cannot take a part of the definition in isolation
unless you ensure that the constraints imposed by the rest of the
definition have been handled properly.

Thanks,

-- 
Raul

On Sat, Jan 12, 2013 at 2:37 AM, Linda Alvord <lindaalv...@verizon.net> wrote:
>  My issue is with the vocabulary. Here is compose:
>
> u&v y ↔ u v y . Thus +:&- 7 is _14 (double the negation). Moreover, the 
> monads u&v and u@v are equivalent.
>
>    f=: 13 :'#&>y'
>     f 'one';'two';'three'
>  3 3 5
>
>    g=: 13  :'#>y'
>    g 'one';'two';'three'
> 3
>
> I play the part of a perpetual beginner.  When a statement is in the 
> vocabulary I should be able to trust that it will work.  As I see it, it does 
> not work.
>
> My question is why not?
>
> Linda
>
> -----Original Message-----
> From: programming-boun...@forums.jsoftware.com 
> [mailto:programming-boun...@forums.jsoftware.com] On Behalf Of Linda Alvord
> Sent: Saturday, January 12, 2013 2:19 AM
> To: programm...@jsoftware.com
> Subject: Re: [Jprogramming] joining to an empty list
>
> Fortunately it shows up in my sent messages in small print.
>
> Linda
>
> -----Original Message-----
> From: programming-boun...@forums.jsoftware.com 
> [mailto:programming-boun...@forums.jsoftware.com] On Behalf Of Raul Miller
> Sent: Friday, January 11, 2013 10:14 PM
> To: programm...@jsoftware.com
> Subject: Re: [Jprogramming] joining to an empty list
>
> On Fri, Jan 11, 2013 at 10:07 PM, Linda Alvord <lindaalv...@verizon.net> 
> wrote:
>> I don't understand why  f  and  g  do not agree?
>
> Because they are doing something different.
>
>>    #&>'one';'two';'three'
>> 3 3 5
>>    f=: 13 :'#&>y'
>>    f 'one';'two';'three'
>> 3 3 5
>
> f counts the number of items in each box.
>
>>    NB. Compose:   u&v y ↔ u v y
>>
>>   g=: 13  :'#>y'
>>    g=: 13  :'#>y'
>>    g 'one';'two';'three'
>> 3
>
> g counts the number of items after unboxing.
>
> Let's try replacing # with <
>
>    <@> 'one';'two';'three'
> +---+---+-----+
> |one|two|three|
> +---+---+-----+
>    <> 'one';'two';'three'
> +-----+
> |one  |
> |two  |
> |three|
> +-----+
>
> Or, let's change the data and use $
>
>     $@> i.each 2 2; 3 3; 4 4
> 2 2
> 3 3
> 4 4
>    $> i. each 2 2; 3 3; 4 4
> 3 4 4
>
> Remember that > has rank 0 so F@> is going to run an independent instance of 
> F for each box that you are unpacking.
>
> Does this help?
>
> --
> Raul
> ----------------------------------------------------------------------
> 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

Reply via email to