After Reply -> Format Text -> Zoom -> Click 100%  (What a relief!) From 
Microsoft Help

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

Reply via email to