<s>
Nial	B-Language
(	O
from	O
"	O
Nested	B-Language
Interactive	I-Language
Array	I-Language
Language	I-Language
"	O
)	O
is	O
a	O
high-level	O
array	B-Application
programming	I-Application
language	I-Application
developed	O
from	O
about	O
1981	O
by	O
Mike	O
Jenkins	O
of	O
Queen	O
's	O
University	O
,	O
Kingston	O
,	O
Ontario	O
,	O
Canada	O
.	O
</s>
<s>
Jenkins	O
co-created	O
the	O
Jenkins	B-Algorithm
–	I-Algorithm
Traub	I-Algorithm
algorithm	I-Algorithm
.	O
</s>
<s>
Nial	B-Language
combines	O
a	O
functional	O
programming	O
notation	O
for	O
arrays	O
based	O
on	O
an	O
array	B-Application
theory	O
developed	O
by	O
Trenchard	B-Application
More	I-Application
with	O
structured	O
programming	O
concepts	O
for	O
numeric	O
,	O
character	O
,	O
and	O
symbolic	O
data	O
.	O
</s>
<s>
It	O
is	O
most	O
often	O
used	O
for	O
prototyping	O
and	O
artificial	B-Application
intelligence	I-Application
.	I-Application
</s>
<s>
In	O
1982	O
,	O
Jenkins	O
formed	O
a	O
company	O
(	O
Nial	B-Language
Systems	O
Ltd	O
)	O
to	O
market	O
the	O
language	O
and	O
the	O
Q'Nial	O
implementation	O
of	O
Nial	B-Language
.	O
</s>
<s>
As	O
of	O
2014	O
,	O
the	O
company	O
website	O
supports	O
an	O
Open	O
Source	O
project	O
for	O
the	O
Q'Nial	O
software	O
with	O
the	O
binary	O
and	O
source	O
available	O
for	O
download	O
.	O
</s>
<s>
Its	O
license	O
is	O
derived	O
from	O
Artistic	O
License	O
1.0	O
,	O
the	O
only	O
differences	O
being	O
the	O
preamble	O
,	O
the	O
definition	O
of	O
"	O
Copyright	O
Holder	O
"	O
(	O
which	O
is	O
changed	O
from	O
"	O
whoever	O
is	O
named	O
in	O
the	O
copyright	O
or	O
copyrights	O
for	O
the	O
package	O
"	O
to	O
"	O
NIAL	B-Language
Systems	O
Limited	O
"	O
)	O
,	O
and	O
an	O
instance	O
of	O
"	O
whoever	O
"	O
(	O
which	O
is	O
changed	O
to	O
"	O
whomever	O
"	O
)	O
.	O
</s>
<s>
Nial	B-Language
uses	O
a	O
generalized	O
and	O
expressive	O
Array	B-Application
Theory	O
in	O
its	O
Version	O
4	O
,	O
but	O
sacrificed	O
some	O
of	O
the	O
generality	O
of	O
functional	O
model	O
,	O
and	O
modified	O
the	O
Array	B-Application
Theory	O
in	O
the	O
Version	O
6	O
.	O
</s>
<s>
Nial	B-Language
defines	O
all	O
its	O
data	O
types	O
as	O
nested	O
rectangular	O
arrays	O
.	O
</s>
<s>
are	O
considered	O
as	O
a	O
solitary	O
array	B-Application
or	O
an	O
array	B-Application
containing	O
a	O
single	O
member	O
.	O
</s>
<s>
Nial	B-Language
also	O
provides	O
Records	O
.	O
</s>
<s>
They	O
are	O
defined	O
as	O
non-homogenous	O
array	B-Application
structure	O
.	O
</s>
<s>
Functions	O
in	O
Nial	B-Language
are	O
called	O
Operations	O
.	O
</s>
<s>
From	O
Nial	B-Language
manual	O
:	O
"	O
An	O
operation	O
is	O
a	O
functional	O
object	O
that	O
is	O
given	O
an	O
argument	O
array	B-Application
and	O
returns	O
a	O
result	O
array	B-Application
.	O
</s>
<s>
Nial	B-Language
like	O
other	O
APL-derived	O
languages	O
allows	O
the	O
unification	O
of	O
binary	O
operators	O
and	O
operations	O
.	O
</s>
<s>
Array	B-Application
notation	O
:	O
</s>
<s>
Nial	B-Language
also	O
uses	O
transformers	O
which	O
are	O
higher	O
order	O
functions	O
.	O
</s>
<s>
An	O
atlas	O
in	O
Nial	B-Language
is	O
an	O
operation	O
made	O
up	O
of	O
an	O
array	B-Application
of	O
component	O
operations	O
.	O
</s>
<s>
Shape	O
gives	O
the	O
array	B-Application
dimensions	O
and	O
reshape	O
can	O
be	O
used	O
to	O
reshape	O
the	O
dimensions	O
.	O
</s>
<s>
Count	O
generates	O
an	O
array	B-Application
1	O
..	O
N	O
and	O
pass	O
is	O
N	O
(	O
identity	O
operation	O
)	O
.	O
</s>
<s>
eachright	O
applies	O
is_divisible	O
(	O
pass	O
,	O
element	O
)	O
in	O
each	O
element	O
of	O
count-generated	O
array	B-Application
.	O
</s>
<s>
Thus	O
this	O
transforms	O
the	O
count-generated	O
array	B-Application
into	O
an	O
array	B-Application
where	O
numbers	O
that	O
can	O
divide	O
N	O
are	O
replaced	O
by	O
'	O
1	O
 '	O
and	O
others	O
by	O
'	O
0	O
 '	O
.	O
</s>
<s>
Hence	O
if	O
the	O
number	O
N	O
is	O
prime	O
,	O
sum	O
[	O
transformed	O
array ]	O
must	O
be	O
2	O
(	O
itself	O
and	O
1	O
)	O
.	O
</s>
<s>
Now	O
all	O
that	O
remains	O
is	O
to	O
generate	O
another	O
array	B-Application
using	O
count	O
N	O
,	O
and	O
filter	O
all	O
that	O
are	O
not	O
prime	O
.	O
</s>
<s>
sublist	O
 [ A , B ] 	O
returns	O
a	O
list	O
of	O
items	O
of	O
B	O
chosen	O
according	O
to	O
the	O
list	O
of	O
booleans	O
given	O
in	O
A	O
,	O
selecting	O
those	O
items	O
of	O
B	O
where	O
the	O
corresponding	O
item	O
of	O
A	B-Application
is	I-Application
true	O
.	O
</s>
<s>
In	O
a	O
Fork	O
 [ A , B , C ] 	O
X	O
the	O
first	O
A	B-Application
is	I-Application
a	O
predicate	O
,	O
and	O
if	O
A(X )	O
is	O
true	O
,	O
then	O
B(X )	O
is	O
returned	O
else	O
C(X )	O
is	O
returned	O
.	O
</s>
