Content deleted Content added
change paradigms template to navbox (see Template talk:Programming paradigms#too long) |
→Languages: Added Raku |
||
Line 24:
==Languages==
The canonical examples of array programming languages are [[Fortran]], [[APL (programming language)|APL]], and [[J (programming language)|J]]. Others include: [[A+ (programming language)|A+]], [[Analytica (software)|Analytica]], [[Chapel (programming language)|Chapel]], [[IDL (programming language)|IDL]], [[Julia (programming language)|Julia]], [[K (programming language)|K]], Klong, [[Q (programming language from Kx Systems)|Q]], [[MATLAB]], [[GNU Octave]], [[Scilab]], [[FreeMat]], [[Perl Data Language|PDL]], [[R (programming language)|R]], [[Raku (programming language)|Raku]], [[S-Lang (programming language)|S-Lang]], [[SAC programming language|SAC]], [[Nial programming language|Nial]], [[ZPL (programming language)|ZPL]], [[Futhark (programming language)|Futhark]], and [[TI-BASIC]].
===Scalar languages===
Line 236:
[1,] 30 21
[2,] 42 30
</syntaxhighlight>
====Raku====
Raku supports the array paradigm via its Metaoperators<ref>{{cite web |url=https://docs.raku.org/language/operators#Metaoperators |title=Metaoperators section of Raku Operator documentation}}</ref>. The following example demonstrates the addition of arrays @a and @b using the Hyper-operator in conjunction with the plus operator.
<syntaxhighlight lang="raku">
[0] > my @a = [[1,1],[2,2],[3,3]];
[[1 1] [2 2] [3 3]]
[1] > my @b = [[4,4],[5,5],[6,6]];
[[4 4] [5 5] [6 6]]
[2] > @a »+« @b;
[[5 5] [7 7] [9 9]]
</syntaxhighlight>
|