<s>
The	O
programming	O
language	O
APL	B-Language
is	O
distinctive	O
in	O
being	O
symbolic	O
rather	O
than	O
lexical	O
:	O
its	O
primitives	O
are	O
denoted	O
by	O
symbols	O
,	O
not	O
words	O
.	O
</s>
<s>
APL	B-Language
programmers	O
often	O
assign	O
informal	O
names	O
when	O
discussing	O
functions	O
and	O
operators	O
(	O
for	O
example	O
,	O
"	O
product	O
"	O
for	O
×	O
/	O
)	O
but	O
the	O
core	O
functions	O
and	O
operators	O
provided	O
by	O
the	O
language	O
are	O
denoted	O
by	O
non-textual	O
symbols	O
.	O
</s>
<s>
A	O
monadic	O
function	B-Application
takes	O
as	O
its	O
argument	O
the	O
result	O
of	O
evaluating	O
everything	O
to	O
its	O
right	O
.	O
</s>
<s>
A	O
dyadic	O
function	B-Application
has	O
another	O
argument	O
,	O
the	O
first	O
item	O
of	O
data	O
on	O
its	O
left	O
.	O
</s>
<s>
APL	B-Language
uses	O
the	O
term	O
operator	O
in	O
Heaviside	O
’s	O
sense	O
as	O
a	O
moderator	O
of	O
a	O
function	B-Application
as	O
opposed	O
to	O
some	O
other	O
programming	O
language	O
's	O
use	O
of	O
the	O
same	O
term	O
as	O
something	O
that	O
operates	O
on	O
data	O
,	O
ref	O
.	O
</s>
<s>
Other	O
programming	O
languages	O
also	O
sometimes	O
use	O
this	O
term	O
interchangeably	O
with	O
function	B-Application
,	O
however	O
both	O
terms	O
are	O
used	O
in	O
APL	B-Language
more	O
precisely	O
.	O
</s>
<s>
Early	O
definitions	O
of	O
APL	B-Language
symbols	I-Language
were	O
very	O
specific	O
about	O
how	O
symbols	O
were	O
categorized	O
.	O
</s>
<s>
For	O
example	O
,	O
the	O
operator	O
reduce	B-Application
is	O
denoted	O
by	O
a	O
forward	O
slash	O
and	O
reduces	O
an	O
array	O
along	O
one	O
axis	O
by	O
interposing	O
its	O
function	B-Application
operand	O
.	O
</s>
<s>
An	O
example	O
of	O
reduce	B-Application
:	O
</s>
<s>
In	O
the	O
above	O
case	O
,	O
the	O
reduce	B-Application
or	O
slash	O
operator	O
moderates	O
the	O
multiply	O
function	B-Application
.	O
</s>
<s>
(	O
From	O
a	O
vector	B-Data_Structure
,	O
×	O
/	O
returns	O
the	O
product	O
of	O
all	O
its	O
elements	O
.	O
)	O
</s>
<s>
On	O
the	O
left	O
side	O
,	O
the	O
2-element	O
vector	B-Data_Structure
{	O
45	O
67}	O
is	O
expanded	O
where	O
boolean	O
0s	O
occur	O
to	O
result	O
in	O
a	O
3-element	O
vector	B-Data_Structure
{	O
45	O
0	O
67}	O
—	O
note	O
how	O
APL	B-Language
inserted	O
a	O
0	O
into	O
the	O
vector	B-Data_Structure
.	O
</s>
<s>
Conversely	O
,	O
the	O
exact	O
opposite	O
occurs	O
on	O
the	O
right	O
side	O
—	O
where	O
a	O
3-element	O
vector	B-Data_Structure
becomes	O
just	O
2-elements	O
;	O
boolean	O
0s	O
delete	O
items	O
using	O
the	O
dyadic	O
/	O
slash	O
function	B-Application
.	O
</s>
<s>
APL	B-Language
symbols	I-Language
also	O
operate	O
on	O
lists	B-Language
(	O
vector	B-Data_Structure
)	O
of	O
items	O
using	O
data	O
types	O
other	O
than	O
just	O
numeric	O
,	O
for	O
example	O
a	O
2-element	O
vector	B-Data_Structure
of	O
character	O
strings	O
{	O
"	O
Apples	O
"	O
"	O
Oranges	O
"	O
}	O
could	O
be	O
substituted	O
for	O
numeric	O
vector	B-Data_Structure
{	O
45	O
67}	O
above	O
.	O
</s>
<s>
In	O
APL	B-Language
the	O
precedence	O
hierarchy	O
for	O
functions	O
or	O
operators	O
is	O
strictly	O
positional	O
:	O
expressions	O
are	O
evaluated	O
right-to-left	O
.	O
</s>
<s>
APL	B-Language
does	O
not	O
follow	O
the	O
usual	O
operator	O
precedence	O
of	O
other	O
programming	O
languages	O
;	O
for	O
example	O
,	O
×	O
does	O
not	O
bind	O
its	O
operands	O
any	O
more	O
"	O
tightly	O
"	O
than	O
+	O
.	O
</s>
<s>
Instead	O
of	O
operator	O
precedence	O
,	O
APL	B-Language
defines	O
a	O
notion	O
of	O
scope	O
.	O
</s>
<s>
The	O
scope	O
of	O
a	O
function	B-Application
determines	O
its	O
arguments	O
.	O
</s>
<s>
A	O
dyadic	O
function	B-Application
has	O
short	O
left	O
scope	O
:	O
it	O
takes	O
as	O
its	O
left	O
arguments	O
the	O
first	O
piece	O
of	O
data	O
to	O
its	O
left	O
.	O
</s>
<s>
For	O
example	O
,	O
(	O
leftmost	O
column	O
below	O
is	O
actual	O
program	O
code	O
from	O
an	O
APL	B-Language
user	B-Protocol
session	I-Protocol
,	O
indented	O
=	O
actual	O
user	B-Application
input	I-Application
,	O
not-indented	O
=	O
result	O
returned	O
by	O
APL	B-Language
interpreter	O
)	O
:	O
</s>
<s>
APL	B-Language
is	O
going	O
to	O
execute	O
from	O
right-to-left	O
.	O
</s>
<s>
Step	O
1{of	O
topmost	O
APL	B-Language
code	O
entered	O
at	O
left}	O
)	O
4-5	O
=	O
-1	O
.	O
</s>
<s>
An	O
operator	O
may	O
have	O
function	B-Application
or	O
data	O
operands	O
and	O
evaluate	O
to	O
a	O
dyadic	O
or	O
monadic	O
function	B-Application
.	O
</s>
<s>
An	O
operator	O
takes	O
as	O
its	O
left	O
operand	O
the	O
longest	O
function	B-Application
to	O
its	O
left	O
.	O
</s>
<s>
APL	B-Language
atomic	O
or	O
piecemeal	O
sub-analysis	O
(	O
full	O
explanation	O
)	O
:	O
</s>
<s>
Beginning	O
rightmost	O
:	O
⍳¨3	O
3	O
produces	O
a	O
2-element	O
nested	O
APL	B-Language
vector	B-Data_Structure
{	O
{	O
1	O
2	O
3}	O
{	O
1	O
2	O
3}	O
}	O
where	O
each	O
element	O
is	O
itself	O
a	O
vector	B-Data_Structure
{	O
1	O
2	O
3}	O
.	O
</s>
<s>
Iota	B-Protocol
⍳3	O
by	O
itself	O
would	O
produce	O
{	O
1	O
2	O
3}	O
.	O
</s>
<s>
The	O
diaeresis	O
¨	O
or	O
mini	O
double-dot	O
means	O
repeat	O
or	O
over	O
each	O
or	O
perform	O
each	O
separately	O
so	O
iota	B-Protocol
repeats	O
(	O
in	O
human	O
i.e.	O
,	O
reversed	O
terms	O
,	O
the	O
APL	B-Language
interpreter	O
reads	O
3	O
3	O
over	O
each	O
use	O
iota	B-Protocol
)	O
,	O
concisely	O
:	O
iota	B-Protocol
for	O
each	O
3	O
.	O
</s>
<s>
The	O
left	O
operand	O
for	O
the	O
over-each	O
operator	O
¨	O
is	O
the	O
index	O
⍳	B-Language
function	B-Application
.	O
</s>
<s>
The	O
derived	O
function	B-Application
⍳¨	O
is	O
used	O
monadically	O
and	O
takes	O
as	O
its	O
right	O
operand	O
the	O
vector	B-Data_Structure
3	O
3	O
.	O
</s>
<s>
The	O
left	O
scope	O
of	O
each	O
is	O
terminated	O
by	O
the	O
reduce	B-Application
operator	O
,	O
denoted	O
by	O
the	O
forward	O
slash	O
.	O
</s>
<s>
Its	O
left	O
operand	O
is	O
the	O
function	B-Application
expression	O
to	O
its	O
left	O
:	O
the	O
outer	O
product	O
of	O
the	O
equals	O
function	B-Application
.	O
</s>
<s>
The	O
result	O
of	O
∘	O
.	O
=/	O
is	O
a	O
monadic	O
function	B-Application
.	O
</s>
<s>
With	O
a	O
function	B-Application
's	O
usual	O
long	O
right	O
scope	O
,	O
it	O
takes	O
as	O
its	O
right	O
argument	O
the	O
result	O
of	O
⍳¨3	O
3	O
.	O
</s>
<s>
Equivalent	O
results	O
in	O
APL	B-Language
:	O
( ⍳3	O
)	O
( ⍳3	O
)	O
and	O
<<	O
Rightmost	O
expression	O
is	O
.	O
</s>
<s>
The	O
matrix	O
of	O
1s	O
and	O
0s	O
similarly	O
produced	O
by	O
∘	O
.	O
=/	O
⍳¨3	O
3	O
and	O
( ⍳3	O
)	O
∘	O
.	O
=⍳3	O
is	O
called	O
an	O
identity	B-Algorithm
matrix	I-Algorithm
.	O
</s>
<s>
Identity	B-Algorithm
matrices	I-Algorithm
are	O
useful	O
in	O
solving	O
matrix	O
determinants	O
,	O
groups	O
of	O
linear	O
equations	O
and	O
multiple	B-General_Concept
regression	I-General_Concept
.	O
</s>
<s>
Some	O
APL	B-Language
interpreters	O
support	O
the	O
compose	B-Algorithm
operator	O
∘	O
and	O
the	O
commute	O
operator	O
⍨	B-Language
.	O
</s>
<s>
The	O
former	O
∘	O
glues	O
functions	O
together	O
so	O
that	O
foo∘bar	O
,	O
for	O
example	O
,	O
could	O
be	O
a	O
hypothetical	O
function	B-Application
that	O
applies	O
defined	O
function	B-Application
foo	O
to	O
the	O
result	O
of	O
defined	O
function	B-Application
bar	O
;	O
foo	O
and	O
bar	O
can	O
represent	O
any	O
existing	O
function	B-Application
.	O
</s>
<s>
In	O
cases	O
where	O
a	O
dyadic	O
function	B-Application
is	O
moderated	O
by	O
commute	O
and	O
then	O
used	O
monadically	O
,	O
its	O
right	O
argument	O
is	O
taken	O
as	O
its	O
left	O
argument	O
as	O
well	O
.	O
</s>
<s>
Thus	O
,	O
a	O
derived	O
or	O
composed	O
function	B-Application
(	O
named	O
im	O
at	O
left	O
)	O
is	O
used	O
in	O
the	O
APL	B-Language
user	B-Protocol
session	I-Protocol
to	O
return	O
a	O
9-element	O
identity	B-Algorithm
matrix	I-Algorithm
using	O
its	O
right	O
argument	O
,	O
parameter	O
or	O
operand	O
=	O
3	O
.	O
</s>
<s>
Example	O
using	O
APL	B-Language
to	O
index	O
⍳	B-Language
or	O
find	O
(	O
or	O
not	O
find	O
)	O
elements	O
in	O
a	O
character	O
vector	B-Data_Structure
:	O
</s>
<s>
First	O
,	O
variable	O
Letters	O
is	O
assigned	O
a	O
vector	B-Data_Structure
of	O
5-elements	O
,	O
in	O
this	O
case	O
-	O
letters	O
of	O
the	O
alphabet	O
.	O
</s>
<s>
The	O
shape	O
⍴	B-Language
or	O
character	O
vector-length	O
of	O
Letters	O
is	O
5	O
.	O
</s>
<s>
At	O
left	O
,	O
dyadic	O
function	B-Application
iota	B-Protocol
searches	O
through	O
its	O
left	O
argument(Letters )	O
for	O
the	O
search	O
string	O
(	O
iota	B-Protocol
's	O
right	O
argument	O
,	O
FindIt	O
)	O
.	O
</s>
<s>
Iota	B-Protocol
finds	O
letter	O
"	O
C	O
"	O
at	O
position	O
3	O
in	O
Letters	O
,	O
it	O
finds	O
"	O
A	O
"	O
at	O
position	O
1	O
,	O
and	O
"	O
B	O
"	O
at	O
position	O
2	O
.	O
</s>
<s>
Iota	B-Protocol
correctly	O
did	O
not	O
find	O
"	O
S	O
"	O
(	O
6	O
)	O
.	O
</s>
<s>
Name(s )	O
Notation	O
Meaning	O
Unicode	O
code	O
point	O
Roll	O
One	O
integer	O
selected	O
randomly	O
from	O
the	O
first	O
B	O
integers	O
Ceiling	O
Least	O
integer	O
greater	O
than	O
or	O
equal	O
to	O
B	O
Floor	O
Greatest	O
integer	O
less	O
than	O
or	O
equal	O
to	O
B	O
Shape	O
,	O
Rho	O
Number	O
of	O
components	O
in	O
each	O
dimension	O
of	O
B	O
Not	O
,	O
Tilde	O
Logical	O
:	O
∼1	O
is	O
0	O
,	O
∼0	O
is	O
1	O
Absolute	O
value	O
Magnitude	O
of	O
B	O
Index	O
generator	O
,	O
Iota	B-Protocol
Vector	B-Data_Structure
of	O
the	O
first	O
B	O
integers	O
Exponential	O
e	O
to	O
the	O
B	O
power	O
Negation	O
Changes	O
sign	O
of	O
B	O
Conjugate	O
The	O
complex	O
conjugate	O
of	O
B	O
(	O
real	O
numbers	O
are	O
returned	O
unchanged	O
)	O
Signum	O
¯1	O
if	O
B	O
<	O
0	O
;	O
0	O
if	O
B	O
=	O
0	O
;	O
1	O
if	O
B>0	O
Reciprocal	O
1	O
divided	O
by	O
B	O
Ravel	O
,	O
Catenate	O
,	O
Laminate	O
Reshapes	O
B	O
into	O
a	O
vector	B-Data_Structure
Matrix	O
inverse	O
,	O
Monadic	O
Quad	O
Divide	O
Inverse	O
of	O
matrix	O
B	O
Pi	O
times	O
Multiply	O
by	O
π	O
Logarithm	O
Natural	O
logarithm	O
of	O
B	O
Reversal	O
Reverse	O
elements	O
of	O
B	O
along	O
last	O
axis	O
Reversal	O
Reverse	O
elements	O
of	O
B	O
along	O
first	O
axis	O
Grade	O
up	O
Indices	O
of	O
B	O
which	O
will	O
arrange	O
B	O
in	O
ascending	O
order	O
Grade	O
down	O
Indices	O
of	O
B	O
which	O
will	O
arrange	O
B	O
in	O
descending	O
order	O
Execute	O
Execute	O
an	O
APL	B-Language
expression	O
Monadic	O
format	O
A	O
character	O
representation	O
of	O
B	O
Monadic	O
transpose	O
Reverse	O
the	O
axes	O
of	O
B	O
Factorial	O
Product	O
of	O
integers	O
1	O
to	O
B	O
Depth	O
Nesting	O
depth	O
:	O
1	O
for	O
un-nested	O
array	O
Table	O
Makes	O
B	O
into	O
a	O
table	O
,	O
a	O
2-dimensional	O
array	O
.	O
</s>
<s>
Maximum	O
,	O
Ceiling	O
The	O
greater	O
value	O
of	O
A	O
or	O
B	O
Minimum	O
,	O
Floor	O
The	O
smaller	O
value	O
of	O
A	O
or	O
B	O
Reshape	O
,	O
Dyadic	O
Rho	O
Array	O
of	O
shape	O
A	O
with	O
data	O
B	O
Take	O
Select	O
the	O
first	O
(	O
or	O
last	O
)	O
A	O
elements	O
of	O
B	O
according	O
to	O
×A	O
Drop	O
Remove	O
the	O
first	O
(	O
or	O
last	O
)	O
A	O
elements	O
of	O
B	O
according	O
to	O
×A	O
Decode	O
Value	O
of	O
a	O
polynomial	O
whose	O
coefficients	O
are	O
B	O
at	O
A	O
Encode	O
Base-A	O
representation	O
of	O
the	O
value	O
of	O
B	O
Residue	O
B	O
modulo	O
A	O
Catenation	O
Elements	O
of	O
B	O
appended	O
to	O
the	O
elements	O
of	O
A	O
Expansion	O
,	O
Dyadic	O
Backslash	O
Insert	O
zeros	O
(	O
or	O
blanks	O
)	O
in	O
B	O
corresponding	O
to	O
zeros	O
in	O
A	O
Compression	O
,	O
Dyadic	O
Slash	O
Select	O
elements	O
in	O
B	O
corresponding	O
to	O
ones	O
in	O
A	O
Index	O
of	O
,	O
Dyadic	O
Iota	B-Protocol
The	O
location	O
(	O
index	O
)	O
of	O
B	O
in	O
A	O
;	O
if	O
not	O
found	O
Solution	O
to	O
system	O
of	O
linear	O
equations	O
,	O
multiple	B-General_Concept
regression	I-General_Concept
Ax	O
=	O
B	O
Rotation	O
The	O
elements	O
of	O
B	O
are	O
rotated	O
A	O
positions	O
Rotation	O
The	O
elements	O
of	O
B	O
are	O
rotated	O
A	O
positions	O
along	O
the	O
first	O
axis	O
Logarithm	O
Logarithm	O
of	O
B	O
to	O
base	O
A	O
Dyadic	O
format	O
Format	O
B	O
into	O
a	O
character	O
matrix	O
according	O
to	O
A	O
General	O
transpose	O
The	O
axes	O
of	O
B	O
are	O
ordered	O
by	O
A	O
Combinations	O
Number	O
of	O
combinations	O
of	O
B	O
taken	O
A	O
at	O
a	O
time	O
Diaeresis	O
,	O
Dieresis	O
,	O
Double-Dot	O
Less	O
than	O
Comparison	O
:	O
1	O
if	O
true	O
,	O
0	O
if	O
false	O
Less	O
than	O
or	O
equal	O
Comparison	O
:	O
1	O
if	O
true	O
,	O
0	O
if	O
false	O
Equal	O
Comparison	O
:	O
1	O
if	O
true	O
,	O
0	O
if	O
false	O
Greater	O
than	O
or	O
equal	O
Comparison	O
:	O
1	O
if	O
true	O
,	O
0	O
if	O
false	O
Greater	O
than	O
Comparison	O
:	O
1	O
if	O
true	O
,	O
0	O
if	O
false	O
Not	O
equal	O
Comparison	O
:	O
1	O
if	O
true	O
,	O
0	O
if	O
false	O
Or	O
Boolean	O
Logic	O
:	O
0	O
(	O
False	O
)	O
if	O
both	O
A	O
and	O
B	O
=	O
0	O
,	O
1	O
otherwise	O
.	O
</s>
<s>
Name(s )	O
Symbol	O
Example	O
Meaning	O
(	O
of	O
example	O
)	O
Unicode	O
code	O
point	O
sequence	O
Reduce	B-Application
(	O
last	O
axis	O
)	O
,	O
Slash	O
/	O
Sum	O
across	O
B	O
Reduce	B-Application
(	O
first	O
axis	O
)	O
⌿	B-Language
Sum	O
down	O
B	O
Scan	B-Application
(	O
last	O
axis	O
)	O
,	O
Backslash	O
\	O
Running	O
sum	O
across	O
B	O
Scan	B-Application
(	O
first	O
axis	O
)	O
⍀	B-Language
Running	O
sum	O
down	O
B	O
Inner	O
product	O
.	O
</s>
<s>
Notes	O
:	O
The	O
reduce	B-Application
and	O
scan	B-Application
operators	O
expect	O
a	O
dyadic	O
function	B-Application
on	O
their	O
left	O
,	O
forming	O
a	O
monadic	O
composite	O
function	B-Application
applied	O
to	O
the	O
vector	B-Data_Structure
on	O
its	O
right	O
.	O
</s>
<s>
expects	O
a	O
dyadic	O
function	B-Application
on	O
both	O
its	O
left	O
and	O
right	O
,	O
forming	O
a	O
dyadic	O
composite	O
function	B-Application
applied	O
to	O
the	O
vectors	O
on	O
its	O
left	O
and	O
right	O
.	O
</s>
<s>
If	O
the	O
function	B-Application
to	O
the	O
left	O
of	O
the	O
dot	O
is	O
"	O
∘	O
"	O
(	O
signifying	O
null	O
)	O
then	O
the	O
composite	O
function	B-Application
is	O
an	O
outer	O
product	O
,	O
otherwise	O
it	O
is	O
an	O
inner	O
product	O
.	O
</s>
<s>
Some	O
functions	O
can	O
be	O
followed	O
by	O
an	O
axis	O
indicator	O
in	O
(	O
square	O
)	O
brackets	O
,	O
i.e.	O
,	O
this	O
appears	O
between	O
a	O
function	B-Application
and	O
an	O
array	O
and	O
should	O
not	O
be	O
confused	O
with	O
array	O
subscripts	O
written	O
after	O
an	O
array	O
.	O
</s>
<s>
For	O
example	O
,	O
given	O
the	O
⌽	B-Language
(	O
reversal	O
)	O
function	B-Application
and	O
a	O
two-dimensional	O
array	O
,	O
the	O
function	B-Application
by	O
default	O
operates	O
along	O
the	O
last	O
axis	O
but	O
this	O
can	O
be	O
changed	O
using	O
an	O
axis	O
indicator	O
:	O
</s>
<s>
4	O
rows	O
by	O
3	O
cols	O
matrix	O
created	O
,	O
using	O
rho	O
⍴	B-Language
and	O
iota	B-Protocol
⍳	B-Language
.	O
</s>
<s>
A	O
is	O
now	O
reflected	O
or	O
flipped	O
along	O
its	O
vertical	O
axis	O
as	O
symbol	O
⌽	B-Language
visually	O
indicates	O
.	O
</s>
<s>
A	O
is	O
now	O
reflected	O
both	O
vertically	O
⊖	O
and	O
horizontally	O
⌽	B-Language
.	O
</s>
<s>
A	O
is	O
⍉	B-Language
transposed	O
to	O
a	O
3	O
row	O
by	O
4	O
col	O
matrix	O
such	O
that	O
rows-cols	O
become	O
exchanged	O
,	O
as	O
symbol	O
⍉	B-Language
visually	O
portrays	O
.	O
</s>
<s>
These	O
types	O
of	O
data	B-General_Concept
transformations	I-General_Concept
are	O
useful	O
in	O
time	O
series	O
analysis	O
and	O
spatial	B-General_Concept
coordinates	I-General_Concept
,	O
just	O
two	O
examples	O
,	O
more	B-General_Concept
exist	I-General_Concept
.	O
</s>
<s>
As	O
a	O
particular	O
case	O
,	O
if	O
the	O
dyadic	O
catenate	O
"	O
,	O
"	O
function	B-Application
is	O
followed	O
by	O
an	O
axis	O
indicator	O
(	O
or	O
axis	O
modifier	O
to	O
a	O
symbol/function	O
)	O
,	O
it	O
can	O
be	O
used	O
to	O
laminate	O
(	O
interpose	O
)	O
two	O
arrays	B-Data_Structure
depending	O
on	O
whether	O
the	O
axis	O
indicator	O
is	O
less	O
than	O
or	O
greater	O
than	O
the	O
index	O
origin	O
(	O
index	O
origin	O
=	O
1	O
in	O
illustration	O
below	O
)	O
:	O
</s>
<s>
At	O
left	O
,	O
variable	O
'	O
B	O
 '	O
is	O
first	O
assigned	O
a	O
vector	B-Data_Structure
of	O
4	O
consecutive	O
integers	O
(	O
e.g.	O
,	O
⍳4	O
)	O
.Var	O
C	O
is	O
then	O
assigned	O
4	O
more	O
consecutive	O
integers	O
(	O
such	O
as	O
4+⍳4	O
)	O
.	O
</s>
<s>
'	O
B	O
 '	O
and	O
C	O
are	O
then	O
concatenated	O
or	O
raveled	O
together	O
for	O
illustration	O
purposes	O
,	O
resulting	O
in	O
a	O
single	O
vector	B-Data_Structure
( ⍳8	O
)	O
.	O
</s>
<s>
In	O
the	O
particular	O
case	O
at	O
left	O
,	O
if	O
the	O
dyadic	O
catenate	O
"	O
,	O
"	O
function	B-Application
is	O
followed	O
by	O
an	O
axis	O
indicator	O
( [	O
0.5	O
]	O
which	O
is	O
less	O
than	O
1	O
)	O
,	O
it	O
can	O
be	O
used	O
to	O
laminate	O
(	O
interpose	O
)	O
two	O
arrays	B-Data_Structure
(	O
vectors	O
in	O
this	O
case	O
)	O
depending	O
on	O
whether	O
the	O
axis	O
indicator	O
is	O
less	O
than	O
or	O
greater	O
than	O
the	O
index	O
origin(1 )	O
.	O
</s>
<s>
Arrays	B-Data_Structure
are	O
structures	O
which	O
have	O
elements	O
grouped	O
linearly	O
as	O
vectors	O
or	O
in	O
table	O
form	O
as	O
matrices	B-Architecture
—	O
and	O
higher	O
dimensions	O
(	O
3D	O
or	O
cubed	O
,	O
4D	O
or	O
cubed	O
over	O
time	O
,	O
etc	O
.	O
)	O
.	O
</s>
<s>
Arrays	B-Data_Structure
containing	O
both	O
characters	O
and	O
numbers	O
are	O
termed	O
mixed	O
arrays	B-Data_Structure
.	O
</s>
<s>
Array	O
structures	O
containing	O
elements	O
which	O
are	O
also	O
arrays	B-Data_Structure
are	O
called	O
nested	O
arrays	B-Data_Structure
.	O
</s>
<s>
16	O
17	O
18	O
19	O
20	O
Element	O
in	O
X[ row	O
2	O
;	O
col	O
2 ]	O
is	O
changed	O
(	O
from	O
7	O
)	O
to	O
a	O
nested	O
vector	B-Data_Structure
"	O
Text	O
"	O
using	O
the	O
enclose	O
⊂	O
function	B-Application
.	O
</s>
<s>
The	O
function	B-Application
header	O
defines	O
whether	O
a	O
custom	O
function	B-Application
is	O
niladic	O
(	O
no	O
arguments	O
)	O
,	O
monadic	O
(	O
one	O
right	O
argument	O
)	O
or	O
dyadic	O
(	O
left	O
and	O
right	O
arguments	O
)	O
,	O
the	O
local	O
name	O
of	O
the	O
result	O
(	O
to	O
the	O
left	O
of	O
the	O
←	O
assign	O
arrow	O
)	O
,	O
and	O
whether	O
it	O
has	O
any	O
local	O
variables	O
(	O
each	O
separated	O
by	O
semicolon	O
'	O
;	O
'	O
)	O
.	O
</s>
<s>
If	O
allowed	O
,	O
then	O
a	O
function	B-Application
CURVEAREA	O
could	O
be	O
defined	O
twice	O
to	O
replace	O
both	O
monadic	O
CIRCLEAREA	O
and	O
dyadic	O
SEGMENTAREA	O
above	O
,	O
with	O
the	O
monadic	O
or	O
dyadic	O
function	B-Application
being	O
selected	O
by	O
the	O
context	O
in	O
which	O
it	O
was	O
referenced	O
.	O
</s>
<s>
Custom	O
dyadic	O
functions	O
may	O
usually	O
be	O
applied	O
to	O
parameters	O
with	O
the	O
same	O
conventions	O
as	O
built-in	O
functions	O
,	O
i.e.	O
,	O
arrays	B-Data_Structure
should	O
either	O
have	O
the	O
same	O
number	O
of	O
elements	O
or	O
one	O
of	O
them	O
should	O
have	O
a	O
single	O
element	O
which	O
is	O
extended	O
.	O
</s>
<s>
There	O
are	O
exceptions	O
to	O
this	O
,	O
for	O
example	O
a	O
function	B-Application
to	O
convert	O
pre-decimal	O
UK	O
currency	O
to	O
dollars	O
would	O
expect	O
to	O
take	O
a	O
parameter	O
with	O
precisely	O
three	O
elements	O
representing	O
pounds	O
,	O
shillings	O
and	O
pence	O
.	O
</s>
<s>
Inside	O
a	O
program	O
or	O
a	O
custom	O
function	B-Application
,	O
control	O
may	O
be	O
conditionally	O
transferred	O
to	O
a	O
statement	O
identified	O
by	O
a	O
line	O
number	O
or	O
explicit	O
label	O
;	O
if	O
the	O
target	O
is	O
0	O
(	O
zero	O
)	O
this	O
terminates	O
the	O
program	O
or	O
returns	O
to	O
a	O
function	B-Application
's	O
caller	O
.	O
</s>
<s>
The	O
most	O
common	O
form	O
uses	O
the	O
APL	B-Language
compression	O
function	B-Application
,	O
as	O
in	O
the	O
template	O
(	O
condition	O
)	O
/target	O
which	O
has	O
the	O
effect	O
of	O
evaluating	O
the	O
condition	O
to	O
0	O
(	O
false	O
)	O
or	O
1	O
(	O
true	O
)	O
and	O
then	O
using	O
that	O
to	O
mask	O
the	O
target	O
(	O
if	O
the	O
condition	O
is	O
false	O
it	O
is	O
ignored	O
,	O
if	O
true	O
it	O
is	O
left	O
alone	O
so	O
control	O
is	O
transferred	O
)	O
.	O
</s>
<s>
Hence	O
function	B-Application
SEGMENTAREA	O
may	O
be	O
modified	O
to	O
abort	O
(	O
just	O
below	O
)	O
,	O
returning	O
zero	O
if	O
the	O
parameters	O
(	O
DEGREES	O
and	O
RADIUS	O
below	O
)	O
are	O
of	O
different	O
sign	O
:	O
</s>
<s>
The	O
above	O
function	B-Application
SEGMENTAREA	O
works	O
as	O
expected	O
if	O
the	O
parameters	O
are	O
scalars	O
or	O
single-element	O
arrays	B-Data_Structure
,	O
but	O
not	O
if	O
they	O
are	O
multiple-element	O
arrays	B-Data_Structure
since	O
the	O
condition	O
ends	O
up	O
being	O
based	O
on	O
a	O
single	O
element	O
of	O
the	O
SIGN	O
array	O
-	O
on	O
the	O
other	O
hand	O
,	O
the	O
user	O
function	B-Application
could	O
be	O
modified	O
to	O
correctly	O
handle	O
vectorized	O
arguments	O
.	O
</s>
<s>
Operation	O
can	O
sometimes	O
be	O
unpredictable	O
since	O
APL	B-Language
defines	O
that	O
computers	O
with	O
vector-processing	O
capabilities	O
should	O
parallelise	O
and	O
may	O
reorder	O
array	O
operations	O
as	O
far	O
as	O
possible	O
-	O
thus	O
,	O
test	O
and	O
debug	O
user	O
functions	O
particularly	O
if	O
they	O
will	O
be	O
used	O
with	O
vector	B-Data_Structure
or	O
even	O
matrix	O
arguments	O
.	O
</s>
<s>
This	O
affects	O
not	O
only	O
explicit	O
application	O
of	O
a	O
custom	O
function	B-Application
to	O
arrays	B-Data_Structure
,	O
but	O
also	O
its	O
use	O
anywhere	O
that	O
a	O
dyadic	O
function	B-Application
may	O
reasonably	O
be	O
used	O
such	O
as	O
in	O
generation	O
of	O
a	O
table	O
of	O
results	O
:	O
</s>
<s>
A	O
more	O
concise	O
way	O
and	O
sometimes	O
better	O
way	O
-	O
to	O
formulate	O
a	O
function	B-Application
is	O
to	O
avoid	O
explicit	O
transfers	O
of	O
control	O
,	O
instead	O
using	O
expressions	O
which	O
evaluate	O
correctly	O
in	O
all	O
or	O
the	O
expected	O
conditions	O
.	O
</s>
<s>
Sometimes	O
it	O
is	O
correct	O
to	O
let	O
a	O
function	B-Application
fail	O
when	O
one	O
or	O
both	O
input	O
arguments	O
are	O
incorrect	O
-	O
precisely	O
to	O
let	O
user	O
know	O
that	O
one	O
or	O
both	O
arguments	O
used	O
were	O
incorrect	O
.	O
</s>
<s>
The	O
following	O
is	O
more	O
concise	O
than	O
the	O
above	O
SEGMENTAREA	O
function	B-Application
.	O
</s>
<s>
Avoiding	O
explicit	O
transfers	O
of	O
control	O
also	O
called	O
branching	O
,	O
if	O
not	O
reviewed	O
or	O
carefully	O
controlled	O
-	O
can	O
promote	O
use	O
of	O
excessively	O
complex	O
one	O
liners	O
,	O
veritably	O
"	O
misunderstood	O
and	O
complex	O
idioms	O
"	O
and	O
a	O
"	O
write-only	O
"	O
style	O
,	O
which	O
has	O
done	O
little	O
to	O
endear	O
APL	B-Language
to	O
influential	O
commentators	O
such	O
as	O
Edsger	O
Dijkstra	O
.	O
</s>
<s>
Conversely	O
however	O
APL	B-Language
idioms	O
can	O
be	O
fun	O
,	O
educational	O
and	O
useful	O
-	O
if	O
used	O
with	O
helpful	O
comments	O
⍝	B-Language
,	O
for	O
example	O
including	O
source	O
and	O
intended	O
meaning	O
and	O
function	B-Application
of	O
the	O
idiom(s )	O
.	O
</s>
<s>
Here	O
is	O
an	O
APL	B-Language
idioms	O
list	O
,	O
an	O
IBM	O
APL2	O
idioms	O
list	O
here	O
and	O
Finnish	O
APL	B-Language
idiom	O
library	O
here	O
.	O
</s>
<s>
+	O
Miscellaneous	O
symbols	O
Name(s )	O
Symbol	O
Example	O
Meaning	O
(	O
of	O
example	O
)	O
Unicode	O
code	O
point	O
High	O
minusAPL	O
's	O
"	O
high	O
minus	O
"	O
applies	O
to	O
the	O
single	O
number	O
that	O
follows	O
,	O
while	O
the	O
monadic	O
minus	O
function	B-Application
changes	O
the	O
sign	O
of	O
the	O
entire	O
array	O
to	O
its	O
right	O
.	O
</s>
<s>
Most	O
APL	B-Language
implementations	O
support	O
a	O
number	O
of	O
system	O
variables	O
and	O
functions	O
,	O
usually	O
preceded	O
by	O
the	O
⎕	B-Language
(	O
quad	O
)	O
and/or	O
"	O
)	O
"	O
(	O
hook	O
=	O
close	O
parenthesis	O
)	O
character	O
.	O
</s>
<s>
Particularly	O
important	O
and	O
widely	O
implemented	O
is	O
the	O
⎕IO	O
(	O
Index	O
Origin	O
)	O
variable	O
,	O
since	O
while	O
the	O
original	O
IBM	O
APL	B-Language
based	O
its	O
arrays	B-Data_Structure
on	O
1	O
some	O
newer	O
variants	O
base	O
them	O
on	O
zero	O
:	O
</s>
<s>
1X	O
set	O
=	O
to	O
vector	B-Data_Structure
of	O
12	O
consecutive	O
integers	O
.	O
</s>
<s>
Thus	O
,	O
the	O
first	O
position	O
in	O
vector	B-Data_Structure
X	O
or	O
X[1]	O
=	O
1	O
per	O
vector	B-Data_Structure
of	O
iota	B-Protocol
values	O
{	O
1	O
2	O
3	O
4	O
5	O
...	O
}	O
.	O
</s>
<s>
Thus	O
,	O
the	O
'	O
first	O
index	O
position	O
 '	O
in	O
vector	B-Data_Structure
X	O
changes	O
from	O
1	O
to	O
0	O
.	O
</s>
<s>
41226371072	O
Quad	O
WA	O
or	O
⎕WA	O
,	O
another	O
dynamic	O
system	O
variable	O
,	O
shows	O
how	O
much	O
Work	O
Area	O
remains	O
unused	O
or	O
41,226	O
megabytes	O
or	O
about	O
41	O
gigabytes	O
of	O
unused	O
additional	O
total	O
free	O
work	O
area	O
available	O
for	O
the	O
APL	B-Language
workspace	O
and	O
program	O
to	O
process	O
using	O
.	O
</s>
<s>
If	O
this	O
number	O
gets	O
low	O
or	O
approaches	O
zero	O
-	O
the	O
computer	O
may	O
need	O
more	O
random-access	B-Architecture
memory	I-Architecture
(	O
RAM	B-Architecture
)	O
,	O
hard	B-Device
disk	I-Device
drive	I-Device
space	O
or	O
some	O
combination	O
of	O
the	O
two	O
to	O
increase	O
virtual	B-Architecture
memory	I-Architecture
.	O
</s>
<s>
X	O
)	O
VARS	O
a	O
system	O
function	B-Application
in	O
APL	B-Language
,	O
)	O
VARS	O
shows	O
user	O
variable	O
names	O
existing	O
in	O
the	O
current	O
workspace	O
.	O
</s>
<s>
There	O
are	O
also	O
system	O
functions	O
available	O
to	O
users	O
for	O
saving	O
the	O
current	O
workspace	O
e.g.	O
,	O
)	O
SAVE	O
and	O
terminating	O
the	O
APL	B-Language
environment	O
,	O
e.g.	O
,	O
)	O
OFF	O
-	O
sometimes	O
called	O
hook	O
commands	O
or	O
functions	O
due	O
to	O
the	O
use	O
of	O
a	O
leading	O
right	O
parenthesis	O
or	O
hook	O
.	O
</s>
<s>
The	O
Unicode	O
Basic	O
Multilingual	O
Plane	O
includes	O
the	O
APL	B-Language
symbols	I-Language
in	O
the	O
Miscellaneous	O
Technical	O
block	O
,	O
which	O
are	O
thus	O
usually	O
rendered	O
accurately	O
from	O
the	O
larger	O
Unicode	O
fonts	O
installed	O
with	O
most	O
modern	O
operating	O
systems	O
.	O
</s>
<s>
These	O
fonts	O
are	O
rarely	O
designed	O
by	O
typographers	O
familiar	O
with	O
APL	B-Language
glyphs	O
.	O
</s>
<s>
So	O
,	O
while	O
accurate	O
,	O
the	O
glyphs	O
may	O
look	O
unfamiliar	O
to	O
APL	B-Language
programmers	O
or	O
be	O
difficult	O
to	O
distinguish	O
from	O
one	O
another	O
.	O
</s>
<s>
Some	O
Unicode	O
fonts	O
have	O
been	O
designed	O
to	O
display	O
APL	B-Language
well	O
:	O
APLX	O
Upright	O
,	O
APL385	O
Unicode	O
,	O
and	O
SimPL	O
.	O
</s>
<s>
Before	O
Unicode	O
,	O
APL	B-Language
interpreters	O
were	O
supplied	O
with	O
fonts	O
in	O
which	O
APL	B-Language
characters	O
were	O
mapped	O
to	O
less	O
commonly	O
used	O
positions	O
in	O
the	O
ASCII	B-Protocol
character	I-Protocol
sets	I-Protocol
,	O
usually	O
in	O
the	O
upper	O
128	O
code	O
points	O
.	O
</s>
<s>
These	O
mappings	O
(	O
and	O
their	O
national	O
variations	O
)	O
were	O
sometimes	O
unique	O
to	O
each	O
APL	B-Language
vendor	O
's	O
interpreter	O
,	O
which	O
made	O
the	O
display	O
of	O
APL	B-Language
programs	O
on	O
the	O
Web	O
,	O
in	O
text	O
files	O
and	O
manuals	O
-	O
frequently	O
problematic	O
.	O
</s>
<s>
Note	O
the	O
APL	B-Language
On/Off	O
Key	O
-	O
topmost-rightmost	O
key	O
,	O
just	O
below	O
.	O
</s>
<s>
Also	O
note	O
the	O
keyboard	O
had	O
some	O
55	O
unique	O
(	O
68	O
listed	O
per	O
tables	O
above	O
,	O
including	O
comparative	O
symbols	O
but	O
several	O
symbols	O
appear	O
in	O
both	O
monadic	O
and	O
dyadic	O
tables	O
)	O
APL	B-Language
symbol	I-Language
keys	O
(	O
55	O
APL	B-Language
functions	O
(	O
operators	O
)	O
are	O
listed	O
in	O
IBM	O
's	O
5110	O
APL	B-Language
Reference	O
Manual	O
)	O
,	O
thus	O
with	O
the	O
use	O
of	O
alt	O
,	O
shift	O
and	O
ctrl	O
keys	O
-	O
it	O
would	O
theoretically	O
have	O
allowed	O
a	O
maximum	O
of	O
some	O
59	O
(	O
keys	O
)	O
*	O
4	O
(	O
with	O
2-key	O
pressing	O
)	O
*	O
3	O
(	O
with	O
tri-key	O
pressing	O
,	O
e.g.	O
,	O
ctrl-alt-del	O
)	O
or	O
some	O
472	O
different	O
maximum	O
key	O
combinations	O
,	O
approaching	O
the	O
512	O
EBCDIC	B-Language
character	O
max	O
(	O
256	O
chars	O
times	O
2	O
codes	O
for	O
each	O
keys-combination	O
)	O
.	O
</s>
<s>
In	O
practice	O
,	O
early	O
versions	O
were	O
only	O
using	O
something	O
roughly	O
equivalent	O
to	O
55	O
APL	B-Language
special	O
symbols	O
(	O
excluding	O
letters	O
,	O
numbers	O
,	O
punctuation	O
,	O
etc	O
.	O
</s>
<s>
Thus	O
,	O
early	O
APL	B-Language
was	O
then	O
only	O
using	O
about	O
11%	O
(	O
55/472	O
)	O
of	O
a	O
symbolic	O
language	O
's	O
at-that-time	O
utilization	O
potential	O
,	O
based	O
on	O
keyboard	O
#	O
keys	O
limits	O
,	O
again	O
excluding	O
numbers	O
,	O
letters	O
,	O
punctuation	O
,	O
etc	O
.	O
</s>
<s>
In	O
another	O
sense	O
keyboard	O
symbols	O
utilization	O
was	O
closer	O
to	O
100%	O
,	O
highly	O
efficient	O
,	O
since	O
EBCDIC	B-Language
only	O
allowed	O
256	O
distinct	O
chars	O
,	O
and	O
ASCII	B-Protocol
only	O
128	O
.	O
</s>
<s>
APL	B-Language
has	O
proved	O
to	O
be	O
extremely	O
useful	O
in	O
solving	O
mathematical	O
puzzles	O
,	O
several	O
of	O
which	O
are	O
described	O
below	O
.	O
</s>
<s>
The	O
following	O
is	O
an	O
APL	B-Language
one-liner	O
function	B-Application
to	O
visually	O
depict	O
Pascal	O
's	O
triangle	O
:	O
</s>
<s>
Determine	O
the	O
number	O
of	O
prime	O
numbers	O
(	O
prime	O
#	O
is	O
a	O
natural	O
number	O
greater	O
than	O
1	O
that	O
has	O
no	O
positive	O
divisors	O
other	O
than	O
1	O
and	O
itself	O
)	O
up	O
to	O
some	O
number	O
N	O
.	O
Ken	O
Iverson	O
is	O
credited	O
with	O
the	O
following	O
one-liner	O
APL	B-Language
solution	O
to	O
the	O
problem	O
:	O
</s>
<s>
Generate	O
a	O
Fibonacci	B-Algorithm
number	I-Algorithm
sequence	I-Algorithm
,	O
where	O
each	O
subsequent	O
number	O
in	O
the	O
sequence	O
is	O
the	O
sum	O
of	O
the	O
prior	O
two	O
:	O
</s>
