Nial
Nial (from "Nested Interactive Array Language") is a high-level array programming language developed from about 1981 by Mike Jenkins of Queen's University, Kingston, Ontario, Canada.[src] Jenkins co-created the Jenkins–Traub algorithm.[src] Nial combines a functional programming notation for arrays based on an array theory developed by Trenchard More with structured programming concepts for numeric, character, and symbolic data.[src] It is most often used for prototyping and artificial intelligence.[src]
Nial (from "Nested Interactive Array Language") is a high-level array programming language developed from about 1981 by Mike Jenkins of Queen's University, Kingston, Ontario, Canada.[src] Jenkins co-created the Jenkins–Traub algorithm.[src] Nial combines a functional programming notation for arrays based on an array theory developed by Trenchard More with structured programming concepts for numeric, character, and symbolic data.[src] It is most often used for prototyping and artificial intelligence.[src] Arr := [5, 6, 7, 8, 9] |5 6 7 8 9 Shape gives the array dimensions and reshape can be used to reshape the dimensions.[src] shape Arr |5 a := 2 3 reshape Arr # reshape is a binary operation with two arguments.[src] It can also be written in prefix as # a := reshape [[2,3], Arr] |5 6 7 |8 9 5 b := 3 2 reshape Arr |5 6 |7 8 |9 5 inner[+,*] b |130 113 |148 145 fact is recur [ 0 =, 1 first, pass, product, -1 +] fact 4 |24 primes is sublist [ each (2 = sum eachright (0 = mod) [pass,count]), pass ] rest count primes 10 |2 3 5 7 is_divisible is 0 = mod [A,B] Defining is_prime filter is_prime is 2 = sum eachright is_divisible [pass,count] Count generates an array [1..N] and pass is N (identity operation).[src] eachright applies is_divisible (pass, element) in each element of count-generated array.[src] Thus this transforms the count-generated array into an array where numbers that can divide N are replaced by '1' and others by '0'.[src] Hence if the number N is prime, sum [transformed array] must be 2 (itself and 1).[src] Now all that remains is to generate another array using count N, and filter all that are not prime.[src] primes is sublist [each is_prime, pass] rest count quicksort is fork [ >= [1 first,tally], pass, link [ quicksort sublist [ [pass,first], pass ] ] ] Using it: quicksort [5, 8, 7, 4, 3] |3 4 5 7 8[src]
16 sentences · 16 cited inline · 0 references stored
References
No reference rows published for this article.
Cite this article
MLA
"Nial." encyclopegia.org, 2026, https://encyclopegia.org/wiki/nial. Accessed 27 November 2026.
Chicago
"Nial." encyclopegia.org. Accessed November 27, 2026. https://encyclopegia.org/wiki/nial.
APA
encyclopegia.org. (2026). Nial. Retrieved November 27, 2026, from https://encyclopegia.org/wiki/nial
Accessed November 27, 2026 · CC BY-SA 4.0 · citation page · JSON