apl: describe and group symbol columns
[sheet.git] / apl.inc.pl
1 use utf8;
2 (
3 # dyadic, monadic
4 ["∼\nt", undef, "Not, Tilde\nLogical: ∼1 is 0, ∼0 is 1"],
5 ["⍨\nT"],
6 ["+\n-", "Add\nSum of A and B", "Identity\nNo change to B"],
7 ["−\n_", "Subtract\nA minus B", "Negation\nChanges sign of B"],
8 ["×\n-", "Multiply\nA multiplied by B", "Signum\n¯1 if B<0; 0 if B=0; 1 if B>0"],
9 ["÷\n=", "Divide\nA divided by B", "Reciprocal\n1 divided by B"],
10 ["⋆\np", "Exponentiation\nA raised to the B power", "Exponential\ne to the B power"],
11 ["⍣\nP"],
12 ["○\no", "Circle\nTrigonometric functions of B selected by A\nA=1: sin(B) A=2: cos(B) A=3: tan(B)", "Pi times\nMultiply by π"],
13 ["⍥\nO"],
14 ["?\nq", "Deal\nA distinct integers selected randomly from the first B integers", "Roll\nOne integer selected randomly from the first B integers"],
15 ["∈\ne", "Membership, Epsilon\n1 for elements of A present in B; 0 where not."],
16 ["⍷\nE"],
17 ["⌈\ns", "Maximum, Ceiling\nThe greater value of A or B", "Ceiling\nLeast integer greater than or equal to B"],
18 ["⌊\nd", "Minimum, Floor\nThe smaller value of A or B", "Floor\nGreatest integer less than or equal to B"],
19 ["⍴\nr", "Reshape, Dyadic Rho\nArray of shape A with data B", "Shape, Rho\nNumber of components in each dimension of B"],
20 ["↑\ny", "Take\nSelect the first (or last) A elements of B according to ×A"],
21 ["↓\nu", "Drop\nRemove the first (or last) A elements of B according to ×A"],
22 ["⊥\nb", "Decode\nValue of a polynomial whose coefficients are B at A"],
23 ["⊤\nn", "Encode\nBase-A representation of the value of B"],
24 ["∣\nm", "Residue\nB modulo A", "Absolute value\nMagnitude of B"],
25 [",", "Catenation\nElements of B appended to the elements of A", "Ravel, Catenate, Laminate\nReshapes B into a vector"],
26 ["\\","Expansion, Dyadic Backslash\nInsert zeros (or blanks) in B corresponding to zeros in A", "Scan (last axis), Backslash\nRunning sum across B"],
27 ["⍀\n.", undef, "Scan (first axis)\nRunning sum down B"],
28 ["/", "Compression, Dyadic Slash\nSelect elements in B corresponding to ones in A", "Reduce (last axis), Slash\nSum across B"],
29 ["⌿\n/", undef, "Reduce (first axis)\nSum down B"],
30 ["⍳\ni", "Index of, Dyadic Iota\nThe location (index) of B in A; 1+⌈/⍳⍴A if not found", "Index generator, Iota\nVector of the first B integers"],
31 ["⌹\n+", "Matrix divide, Dyadic Quad Divide\nSolution to system of linear equations, multiple regression Ax = B", "Matrix inverse, Monadic Quad Divide\nInverse of matrix B"],
32 ["⌽\n%", "Rotation\nThe elements of B are rotated A positions", "Reversal\nReverse elements of B along last axis"],
33 ["⊖\n&", "Rotation\nThe elements of B are rotated A positions along the first axis", "Reversal\nReverse elements of B along first axis"],
34 ["⍟\n*", "Logarithm\nLogarithm of B to base A", "Logarithm\nNatural logarithm of B"],
35 ["⍋\n\$", undef, "Grade up\nIndices of B which will arrange B in ascending order"],
36 ["⍒\n#", undef, "Grade down\nIndices of B which will arrange B in descending order"],
37 ["⍎\n;", undef, "Execute\nExecute an APL expression"],
38 ["⍕\n'", "Dyadic formatting\nFormat B into a character matrix according to A", "Monadic formatting\nA character representation of B"],
39 ["⍉\n^", "General transpose\nThe axes of B are ordered by A", "Monadic transpose\nReverse the axes of B"],
40 ["!", "Combinations\nNumber of combinations of B taken A at a time", "Factorial \nProduct of integers 1 to B"],
41 ["¨\n1", "Diaeresis, Double-Dot\nOver each, or perform each separately; B = on these; A = operation to perform or using(e.g. iota)"],
42 ["<\n3", "Less than\nComparison: 1 if true, 0 if false"],
43 ["≤\n4", "Less than or equal\nComparison: 1 if true, 0 if false"],
44 ["=\n5", "Equal\nComparison: 1 if true, 0 if false"],
45 ["≥\n6", "Greater than or equal\nComparison: 1 if true, 0 if false"],
46 [">\n7", "Greater than\nComparison: 1 if true, 0 if false"],
47 ["≠\n8", "Not equal\nComparison: 1 if true, 0 if false"],
48 ["∨\n9", "Or\nLogic: 0 if A and B are 0; 1 otherwise"],
49 ["∧\n0", "And\nLogic: 1 if A and B are 1; 0 otherwise"],
50 ["⍱\n(", "Nor\nLogic: 1 if both A and B are 0; otherwise 0"],
51 ["⍲\n)", "Nand\nLogic: 0 if both A and B are 1; otherwise 1"],
52
53 # operators and axis indicator
54 [".", undef, "Inner product\nMatrix product of A and B"],
55 ["∘.\nj", undef, "Outer product\nOuter product of A and B"],
56 ["⍤\nJ"],
57
58 # miscellaneous
59 ["¯\n2", undef, "High minus\nDenotes a negative number"],
60 ["⍝\n,", undef, "Lamp, Comment\nEverything to the right of ⍝ denotes a comment"],
61 ["→\n]", undef, "RightArrow, Branch, GoTo\n→This_Label sends APL execution to This_Label:"],
62 ["←\n[", undef, "Assign, LeftArrow, Set to\nB←A sets values and shape of B to match A"],
63 ["⎕\nl", undef, "Quad"],
64 ["⌷\nL"],
65 ["⍞\n{"],
66 [")", undef, "Hook"],
67
68 ["⋄\n`"],
69 ["⌶\n!"],
70 ["⍵\nw"],
71 ["∝\na"],
72 ["_\nf"],
73 ["∆\nh"],
74 ["∇\ng"],
75 ["⍫\n@"],
76 ["'\nk"],
77 ["⊂\nz"],
78 ["⊃\nx"],
79 ["∩\nc"],
80 ["∪\nv"],
81 ["⊢\n\\"],
82 ["⊣\n|"],
83 ["⍬\n}"],
84 ["⍪\n<"],
85 ["⍸\nI"],
86 ["⍙\n>"],
87 ["⍠\n?"],
88 ["≡\n:"],
89 ["≢\n\""],
90 );