I am trying to understand Chapter 3 Rank of Verbs in Henry's lab An 
Introductory Course in J.  Here one of his examples:

   ] array =: 2 3 4 $ 'abcdefghijklmnopqrstuvwx'
abcd
efgh
ijkl

mnop
qrst
uvwx
   {."1 array  NB. Select first item of each 1-cell
aei
mqu

Why isn't the result displayed as

a
e
i

m
q
u

?

The answer is that J always displays vectors horizontally, other arrays 
vertically.  An impractical but consistent display is provided by

   showlist =: [: ": ,."1

which displays all arrays vertically:

   showlist array
a
b
c
d

e
f
g
h

i
j
k
l


m
n
o
p

q
r
s
t

u
v
w
x

The array is a list of two tables, each a list of three vectors (here 
displayed vertically), each a list of four letters.

   showlist {."1 array
a
e
i

m
q
u

The result is a list of two vectors (here displayed vertically), each a 
list of three letters.  In the standard display, the vectors are 
horizontal:

   {."1 array
aei
mqu

By consistently showing lists vertically, verb showlist helps me 
understand examples in Henry's Chapter 3.

Kip Murray

[EMAIL PROTECTED]
http://www.math.uh.edu/~km
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to