-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathlbhelp.json
84 lines (84 loc) · 26 KB
/
lbhelp.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
{
"order":"← +-×÷*⍟⌹○!? |⌈⌊⊥⊤⊣⊢ =≠≤<>≥≡≢ ∨∧⍲⍱ ↑↓⊂⊃⊆⌷⍋⍒ ⍳⍸∊⍷∪∩~ /\\⌿⍀ ,⍪⍴⌽⊖⍉ ¨⍨⍣.∘⍤@ ⍞⎕⍠⌸⌺⌶⍎⍕ ⋄⍝→⍵⍺∇& ¯⍬",
"tips":{
"←":["Left Arrow (←)","Assignment\n\nNaming:\n V ← 5 6 7\n (i(j k)) ← 4(5 6)\n sum ← +⌿\n product ← {×/⍵}\n inverse ← ⍣¯1\n\nModification:\n V +← 1\n V[2] ← 0\n (⊃V) ← 2"],
"+":["Plus (+)","Monadic function: Conjugate\n\n + 1.2 0j4 ¯5j¯6\n1.2 0J¯4 ¯5J6\n\nDyadic function: Plus\n\n 1 2 3 4 + 10\n11 12 13 14\n\n 1 2 3 + 2 ¯4 1\n3 ¯2 4\n\n +/ 1 2 3\n6"],
"-":["Minus (-)","Monadic function: Negate\n\n - 3.2 ¯7 0\n¯3.2 7 0\n\nDyadic function: Minus\n\n 3 7 9 - 5\n¯2 2 4\n\n 5 1 4 - 2 3 4\n3 ¯2 0"],
"×":["Times (×)","Monadic function: Direction\n\n × 3.1 ¯2 0 3j4\n1 ¯1 0 0.6J0.8\n\nDyadic function: Times\n\n 2 ¯3 4.5 × ¯3 ¯4 2\n¯6 12 9\n\n 3 1 4 × 10\n30 10 40\n\n ×/ 2 3 4\n24"],
"÷":["Divide (÷)","Monadic function: Reciprocal\n\n ÷ 1 2 3\n1 0.5 0.333333\n\nDyadic function: Divide\n\n 1 2 3 ÷ 4 5 7\n0.25 0.4 0.428571\n\n 10 ÷ ¯2 0.5\n¯5 20"],
"*":["Star (*)","Monadic function: Exponential\n\n * 0 1 2\n1 2.71828 7.38906\n\nDyadic function: Power\n\n 49 5 ¯4 * 0.5 2 0.5\n7 25 0J2"],
"⍟":["Log (⍟)","Monadic function: Natural Logarithm\n\n ⍟ 1 2 3 2.7182818285\n0 0.693147 1.09861 1\n\nDyadic function: Logarithm\n\n 2 10 ⍟ 32 1000\n5 3"],
"⌹":["Domino (⌹)","Monadic function: Matrix Inverse\n\n mat\n1 2\n3 4\n ⌹ mat\n¯2 1\n 1.5 ¯0.5\n\nDyadic function: Matrix Divide\n\n 5 6 ⌹ mat\n¯4 4.5"],
"○":["Circle (○)","Monadic function: Pi Times\n\n ○ 0 1 2\n0 3.14159 6.28319\n\nDyadic function: Circular Functions (Trig)\n Note: Angles are in radians\n radians ← ○ degrees ÷ 180\n\n 1 ○ 0 1.5707963 3.1415927\n0 1 ¯4.64102E¯8\n\n ⍺ ⍺ ○ ⍵ ⍺ ⍺ ○ ⍵\n 0 (1-⍵*2)*0.5\n¯1 Arcsin ⍵ 1 Sine ⍵\n¯2 Arccos ⍵ 2 Cosine ⍵\n¯3 Arctan ⍵ 3 Tangent ⍵\n¯4 (¯1+⍵*2)*0.5 4 (1+⍵*2)≠0.5\n¯5 Arcsinh ⍵ 5 Sinh ⍵\n¯6 Arccosh ⍵ 6 Cosh ⍵\n¯7 Arctanh ⍵ 7 Tanh ⍵\n¯8 -8○⍵ 8 (-1+⍵*2)*0.5\n¯9 ⍵ 9 real part of ⍵\n¯10 +⍵ 10 |⍵\n¯11 ⍵×0J1 11 imaginary part of ⍵\n¯12 *⍵×0J1 12 phase of ⍵"],
"!":["Exclamation Mark (!)","Monadic function: Factorial\n\n ! 3 9 ¯0.11\n6 362880 1.07683\n\nDyadic function: Binomial\n\n 2 1 3 ! 3 10 ¯0.11\n3 10 ¯0.0429385"],
"?":["Question Mark (?)","Monadic function: Roll\n\n ? 6 6 6 6 6\n4 3 6 3 5\n\n ? 0 0\n0.260561 0.929928\n\nDyadic function: Deal\n\n 13 ? 52\n36 31 44 11 27 42 13 8 2 33 19 34 6"],
"|":["Stile (|)","Monadic function: Magnitude (Absolute value)\n\n | 2.3 ¯4 0 3j4\n2.3 4 0 5\n\nDyadic function: Residue (Remainder/Modulus)\n\n 2 10 ¯2.5 | 7 ¯13 8\n1 7 ¯2"],
"⌈":["Upstile (⌈)","Monadic function: Ceiling (Round Up)\n\n ⌈ 3.4 ¯3.4 3 0\n4 ¯3 3 0\n\nDyadic function: Maximum\n\n 1.1 ¯2 ⌈ 8.1 ¯3.4\n8.1 ¯2\n\n ⌈/ 3 1 4 1\n4"],
"⌊":["Downstile (⌊)","Monadic function: Floor (Round Down)\n\n ⌊ 3.4 ¯3.4 3 0\n3 ¯4 3 0\n\nDyadic function: Minimum\n\n 1.1 ¯2 ⌊ 8.1 ¯3.4\n1.1 ¯3.4\n\n ⌊/ 3 1 4 1\n1"],
"⊥":["Up Tack (⊥)","Dyadic function: Decode\n\n 2 ⊥ 1 1 0 1 ⍝ binary decode\n13\n\n⍝ mixed radix: conversion of hours,\n⍝ minutes and seconds to seconds:\n\n 24 60 60 ⊥ 2 46 40\n10000"],
"⊤":["Down Tack (⊤)","Dyadic function: Encode\n\n 2 2 2 2 ⊤ 5 7 12 ⍝ binary encode\n0 0 1\n1 1 1\n0 1 0\n1 1 0\n\n⍝ mixed radix: encode of 10000 seconds\n⍝ to hours, minutes and seconds:\n\n 24 60 60 ⊤ 10000\n2 46 40"],
"⊣":["Left Tack (⊣)","Monadic function: Same\n\n ⊣ 1 2 3\n1 2 3\n\nDyadic function: Left\n\n 'L' ⊣ 'R'\nL\n ⊣/ 1 2 3\n1"],
"⊢":["Right Tack (⊢)","Monadic function: Same\n\n ⊢ 1 2 3\n1 2 3\n\nDyadic function: Right\n\n 'L' ⊢ 'R'\nR\n ⊢/ 1 2 3\n3"],
"=":["Equal (=)","Dyadic function: Equal To\n\n 1 2 3 = 4 2 ¯1\n0 1 0\n\n 0 1 0 1 = 0 0 1 1\n1 0 0 1\n\n 'Banana' = 'a'\n0 1 0 1 0 1\n\n 7 = '7'\n0"],
"≠":["Not Equal (≠)","Dyadic function: Not Equal To\n\n 1 2 3 ≠ 4 2 ¯1\n1 0 1\n\n 0 1 0 1 ≠ 0 0 1 1\n0 1 1 0\n\n 'Banana' ≠ 'a'\n1 0 1 0 1 0\n\n 7 ≠ '7'\n1"],
"≤":["Less Than Or Equal To (≤)","Dyadic function: Less Than or Equal To\n\n 1 2 3 ≤ 4 2 ¯1\n1 1 0\n 1 2 3 ≤ 2\n1 1 0"],
"<":["Less Than (<)","Dyadic function: Less Than\n\n 1 2 3 < 4 2 ¯1\n1 0 0\n 1 2 3 < 2\n1 0 0"],
">":["Greater Than (>)","Dyadic function: Greater Than\n\n 1 2 3 > 4 2 ¯1\n0 0 1\n 1 2 3 > 2\n0 0 1"],
"≥":["Greater Than Or Equal To (≥)","Dyadic function: Greater Than or Equal To\n\n 1 2 3 ≥ 4 2 ¯1\n0 1 1\n 1 2 3 ≥ 2\n0 1 1"],
"≡":["Equal Underbar (≡)","Monadic function: Depth\n\n ≡ 7\n0\n ≡ 'abc'\n1\n ≡ (1 2)(3 4)\n2\n ≡ (1 2)(3 4)5\n¯2\n\nDyadic function: Match\n\n 'b' 'e' 'x' ≡ 'bex'\n1\n 1 ≡ 1 1\n0"],
"≢":["Equal Underbar Slash (≢)","Monadic function: Tally\n\n ≢ 'a'\n1\n ≢ 7 4 2\n3\n ≢ 5 4 3⍴0\n5\n ≢ (1 2)(3 4)\n2\n mat\n1 2 3\n4 5 6\n ≢ mat ⍝ note how \"tally\"\n2\n ⍴ mat ⍝ differs from \"shape\"\n2 3\n\nDyadic function: Not Match\n\n 'bex' ≢ 'b','e','x'\n0\n 1 ≢ 1 1\n1"],
"∨":["Logical OR (∨)","Dyadic function: Greatest Common Divisor (OR)\n\n 0 1 0 1 ∨ 0 0 1 1\n0 1 1 1\n\n 15 1 2 7 ∨ 35 1 4 0\n5 1 2 7"],
"∧":["Logical AND (∧)","Dyadic function: Lowest Common Multiple (AND)\n\n 0 1 0 1 ∧ 0 0 1 1\n0 0 0 1\n\n 15 1 2 7 ∧ 35 1 4 0\n105 1 4 0"],
"⍲":["Logical NAND (⍲)","Dyadic function: NAND\n\n 0 1 0 1 ⍲ 0 0 1 1\n1 1 1 0"],
"⍱":["Logical NOR (⍱)","Dyadic function: NOR\n\n 0 1 0 1 ⍱ 0 0 1 1\n1 0 0 0"],
"↑":["Up Arrow (↑)","Monadic function: Mix\n\n ↑ 'Hip' 'Hop'\nHip\nHop\n ↑ (6 4) 5 3\n6 4\n5 0\n3 0\n ↑[0.5] 'Hip' 'Hop'\nHH\nio\npp\n\nDyadic function: Take\n\n 4 ↑ 'Pineapple'\nPine\n ¯5 ↑ 'Pineapple'\napple\n\n mat\n1 2 3 4\n5 6 7 8\n9 10 11 12\n\n 2 ¯3 ↑ mat\n2 3 4\n6 7 8\n\n ¯2 ↑ mat\n5 6 7 8\n9 10 11 12\n\n ¯2 3 ↑ 7\n0 0 0\n7 0 0"],
"↓":["Down Arrow (↓)","Monadic function: Split\n\n mat\n1 2 3 4\n5 6 7 8\n9 10 11 12\n\n ↓ mat\n┌───────┬───────┬──────────┐\n│1 2 3 4│5 6 7 8│9 10 11 12│\n└───────┴───────┴──────────┘\n\n ↓[1] mat\n┌─────┬──────┬──────┬──────┐\n│1 5 9│2 6 10│3 7 11│4 8 12│\n└─────┴──────┴──────┴──────┘\n\nDyadic function: Drop\n\n 4 ↓ 'Pineapple'\napple\n ¯5 ↓ 'Pineapple'\nPine\n 1 ¯2 ↓ mat\n5 6\n9 10\n 1 ↓ mat\n5 6 7 8\n9 10 11 12"],
"⊂":["Left Shoe (⊂)","Monadic function: Enclose\n\n 1(2 3)\n┌─┬───┐\n│1│2 3│\n└─┴───┘\n ⊂ 1(2 3)\n┌───────┐\n│┌─┬───┐│\n││1│2 3││\n│└─┴───┘│\n└───────┘\n ⊂⊂ 1(2 3)\n┌─────────┐\n│┌───────┐│\n││┌─┬───┐││\n│││1│2 3│││\n││└─┴───┘││\n│└───────┘│\n└─────────┘\n\nDyadic function: Partitioned Enclose\n\n 0 1 0 1 ⊂ 1 2 3 4\n┌───┬─┐\n│2 3│4│\n└───┴─┘"],
"⊃":["Right Shoe (⊃)","Monadic function: First\n\n ⊃ 'Word'\nW\n ⊃ (1 2)(3 4 5)\n1 2\n\nDyadic function: Pick\n\n 3 ⊃ 'Word'\nr\n 2 ⊃ (1 2)(3 4 5)\n3 4 5\n\n 2 1 ⊃ (1 2)(3 4 5)\n3"],
"⊆":["Left Shoe Underbar (⊆)","Monadic function: Nest\n\n ⊆ 'this'\n┌────┐\n│this│\n└────┘\n ⊆ 'this' 'that'\n┌────┬────┐\n│this│that│\n└────┴────┘\n\nDyadic function: Partition\n\n 1 0 0 1 1 ⊆ 1 2 3 4 5\n┌─┬───┐\n│1│4 5│\n└─┴───┘\n\n ' ' (≠⊆⊢) ' many a time'\n┌────┬─┬────┐\n│many│a│time│\n└────┴─┴────┘"],
"⌷":["Squad (⌷)","Monadic function: Materialise\n\n ⌷ ⍵\nIf ⍵ is an array, returns ⍵.\nIf ⍵ is ref to an instance of a Class with a\nDefault property, all items of the Default\nproperty are returned.\nIf ⍵ is a collection, returns all elements\nin the collection as an array.\n\nDyadic function: Index\n\n mat\n1 2 3 4\n5 6 7 8\n9 10 11 12\n\n 2 3 ⌷ mat\n7\n 2 ⌷ mat\n5 6 7 8\n\n 2 ⌷[2] mat\n2 6 10"],
"⍋":["Grade Up (⍋)","Monadic function: Grade Up\n\nIndices which would select items in ascending order.\n\n ⍋ 33 11 44 66 22\n2 5 1 3 4\n\n names←'Joe' 'Sue' 'Sam'\n ages←34 22 25\n\n names[⍋ages]\n┌───┬───┬───┐\n│Sue│Sam│Joe│\n└───┴───┴───┘\n\n ⍋ 'ABC' ⎕NULL ⍬ ¯3j4 'A'\n3 2 4 5 1\n\nDyadic function: Dyadic Grade Up\n\nProvide collating sequence for character data.\n\n ⍋ 'Banana'\n1 2 4 6 3 5\n\n 'an' ⍋ 'Banana'\n2 4 6 3 5 1"],
"⍒":["Grade Down (⍒)","Monadic function: Grade Down\n\nIndices which would select items in descending order.\n\n ⍒ 33 11 44 66 22\n4 3 1 5 2\n\n names←'Joe' 'Sue' 'Sam'\n ages←34 22 25\n\n names[⍒ages]\n┌───┬───┬───┐\n│Joe│Sam│Sue│\n└───┴───┴───┘\n\n ⍒ 'ABC' ⎕NULL ⍬ ¯3j4 'A'\n1 5 4 2 3\n\nDyadic function: Dyadic Grade Down\n\nProvide collating sequence for character data.\n\n ⍒ 'Banana'\n3 5 2 4 6 1\n\n 'an' ⍒ 'Banana'\n1 3 5 2 4 6"],
"⍳":["Iota (⍳)","Monadic function: Index Generator\n\n ⍳ 10\n1 2 3 4 5 6 7 8 9 10\n\n ⍳ 2 3\n┌───┬───┬───┐\n│1 1│1 2│1 3│\n├───┼───┼───┤\n│2 1│2 2│2 3│\n└───┴───┴───┘\n\nDyadic function: Index Of\n\n 'ABCDABCDEF' ⍳ 'ACF'\n1 3 10\n\n mat\n1 2\n3 4\n5 6\n mat ⍳ 5 6\n3"],
"⍸":["Iota Underbar (⍸)","Monadic function: Where\n\n ⍸ 1 0 0 1 1\n1 4 5\n bmat\n0 1 0\n1 0 1\n ⍸ bmat\n┌───┬───┬───┐\n│1 2│2 1│2 3│\n└───┴───┴───┘\n\nDyadic function: Interval Index\n\n 'AEIOU' ⍸ 'DYALOG'\n1 5 1 3 4 2\n\n 2 4 6 ⍸ 1 2 3 4 5 6 7\n0 1 1 2 2 3 3\n\n mat\n1 2\n3 4\n5 6\n mat ⍸ 3 3\n1\n mat ⍸ 3 5\n2"],
"∊":["Epsilon (∊)","Monadic function: Enlist\n\n mat\n1 2 3\n4 5 6\n ∊ 0 mat (7 8) 9\n0 1 2 3 4 5 6 7 8 9\n\n ∊ 2 3⍴1 'abc'\n1 abc 1 abc 1 abc\n\nDyadic function: Membership\n\n 'abc' 4 ∊ 4 'ab' 'abcd'\n0 1\n mat ∊ 6 2 7 4\n0 1 0\n1 0 1"],
"⍷":["Epsilon Underbar (⍷)","Dyadic function: Find\n\n 'ana' ⍷ 'Banana'\n0 1 0 1 0 0\n\n X Y\n┌───┬───────┐\n│0 1│0 1 0 0│\n│1 0│1 0 0 1│\n│ │0 0 1 0│\n│ │0 1 0 0│\n└───┴───────┘\n\n X ⍷ Y\n1 0 0 0\n0 0 1 0\n0 1 0 0\n0 0 0 0"],
"∪":["Down Shoe (∪)","Monadic function: Unique\n\n ∪ 'ab' 'ba' 'ab' 1 1 2\n┌──┬──┬─┬─┐\n│ab│ba│1│2│\n└──┴──┴─┴─┘\n\n mat\nflywheel\nshyster\nflywheel\n ∪mat\nflywheel\nshyster\n\nDyadic function: Union\n\n 'ab' 'cde' 'fg' ∪ 'a' 'ab'\n┌──┬───┬──┬─┐\n│ab│cde│fg│a│\n└──┴───┴──┴─┘"],
"∩":["Up Shoe (∩)","Dyadic function: Intersection\n\n 22 'ab' 'fg' ∩ 'a' 'ab' 22\n┌──┬──┐\n│22│ab│\n└──┴──┘"],
"~":["Tilde (~)","Monadic function: NOT\n\n ~ 0 1 0 1\n1 0 1 0\n\nDyadic function: Without\n\n 3 1 4 1 5 ~ 5 1\n3 4\n\n 'aa' 'bb' 'cc' 'bb' ~ 'bb' 'xx'\n┌──┬──┐\n│aa│cc│\n└──┴──┘"],
"/":["Slash (/)","Dyadic function: Replicate\n\n 3 1 ¯2 2 / 6 7 8 9\n6 6 6 7 0 0 9 9\n\n 1 0 1 0 1 / 'Heart'\nHat\n\nMonadic operator: Reduce (Fold, N-Wise Reduce)\n\n +/ 1 2 3 4 5\n15\n 2 +/ 1 2 3 4 5 ⍝ pair-wise sum\n3 5 7 9\n\n cube ⍝ 3D array\n 1 2 3 4\n 5 6 7 8\n 9 10 11 12\n\n13 14 15 16\n17 18 19 20\n21 22 23 24\n\n +/ cube\n10 26 42\n58 74 90\n\n +/[1] cube ⍝ sum of planes\n14 16 18 20\n22 24 26 28\n30 32 34 36\n\n +/[2] cube ⍝ column sums\n15 18 21 24\n51 54 57 60"],
"\\":["Backslash (\\)","Dyadic function: Expand\n\n 3 ¯2 4 \\ 7 8\n7 7 7 0 0 8 8 8 8\n\n 1 0 1 0 1 \\ 'Hat'\nH a t\n\nMonadic operator: Scan\n\n +\\ 1 2 3 4 5\n1 3 6 10 15\n\n mat\n1 2 3 4\n5 6 7 8\n9 10 11 12\n\n +\\ mat\n1 3 6 10\n5 11 18 26\n9 19 30 42\n\n +\\[1] mat\n 1 2 3 4\n 6 8 10 12\n15 18 21 24"],
"⌿":["Slash Bar (⌿)","Dyadic function: Replicate First (Compress First)\n\n mat\n1 2 3 4\n5 6 7 8\n9 10 11 12\n\n 1 0 2 ⌿ mat\n1 2 3 4\n9 10 11 12\n9 10 11 12\n\nMonadic operator: Reduce First\n\n +⌿ mat\n15 18 21 24\n\n 2 +⌿ mat ⍝ pair-wise\n 6 8 10 12\n14 16 18 20"],
"⍀":["Backslash Bar (⍀)","Dyadic function: Expand First\n\n mat\n1 2 3 4\n5 6 7 8\n9 10 11 12\n\n 1 0 2 1 ⍀ mat\n1 2 3 4\n0 0 0 0\n5 6 7 8\n5 6 7 8\n9 10 11 12\n\nMonadic operator: Scan First\n\n +⍀ mat\n 1 2 3 4\n 6 8 10 12\n15 18 21 24"],
",":["Comma (,)","Monadic function: Ravel\n\n cube ⍝ 3D array\n1 2\n3 4\n\n5 6\n7 8\n , cube\n1 2 3 4 5 6 7 8\n\n ,[2 3] cube ⍝ Ravel with axes\n1 2 3 4\n5 6 7 8\n\nDyadic function: Catenate/Laminate (Join)\n\n 1 2 3 , 4 5 6\n1 2 3 4 5 6\n\n cube , 99\n1 2 99\n3 4 99\n\n5 6 99\n7 8 99\n\n 1 2 3 ,[0.5] 4 5 6 ⍝ Laminate\n1 2 3\n4 5 6"],
"⍪":["Comma Bar (⍪)","Monadic function: Table\n\n ⍪ 2 3 4\n2\n3\n4\n cube ⍝ 3D array\n1 2\n3 4\n\n5 6\n7 8\n ⍪ cube\n1 2 3 4\n5 6 7 8\n\nDyadic function: Catenate First/Laminate\n\n mat\n1 2 3\n4 5 6\n\n mat ⍪ 0\n1 2 3\n4 5 6\n0 0 0\n\n mat ⍪ 7 8 9\n1 2 3\n4 5 6\n7 8 9"],
"⍴":["Rho (⍴)","Monadic function: Shape\n\n mat\n1 2 3 4\n5 6 7 8\n9 10 11 12\n\n ⍴ mat\n3 4\n ⍴⍴ mat\n2\n ⍴ 'your boat'\n9\n ⍴ 7\n\n ⍴⍴ 7\n0\n\nDyadic function: Reshape\n\n 2 3 4 ⍴ 1 2 3 4 5 6 7\n1 2 3 4\n5 6 7 1\n2 3 4 5\n\n6 7 1 2\n3 4 5 6\n7 1 2 3"],
"⌽":["Circle Stile (⌽)","Monadic function: Reverse\n\n ⌽ 'trams'\nsmart\n\n mat\n1 2 3 4\n5 6 7 8\n9 10 11 12\n\n ⌽ mat\n 4 3 2 1\n 8 7 6 5\n12 11 10 9\n\n ⌽[1] mat\n9 10 11 12\n5 6 7 8\n1 2 3 4\n\nDyadic function: Rotate\n\n 3 ⌽ 'HatStand'\nStandHat\n\n ¯2 ⌽ 1 2 3 4 5 6\n5 6 1 2 3 4\n\n ¯1 ⌽ mat\n 4 1 2 3\n 8 5 6 7\n12 9 10 11\n\n 1 ¯1 2 ⌽ mat\n 2 3 4 1\n 8 5 6 7\n11 12 9 10\n\n 0 1 2 ¯1 ⌽[1] mat\n1 6 11 12\n5 10 3 4\n9 2 7 8"],
"⊖":["Circle Bar (⊖)","Monadic function: Reverse First\n\n mat\n1 2 3 4\n5 6 7 8\n9 10 11 12\n\n ⊖ mat\n9 10 11 12\n5 6 7 8\n1 2 3 4\n\nDyadic function: Rotate First\n\n 0 1 2 ¯1 ⊖ mat\n1 6 11 12\n5 10 3 4\n9 2 7 8"],
"⍉":["Transpose (⍉)","Monadic function: Transpose\n\n mat\n1 2 3\n4 5 6\n\n ⍉ mat\n1 4\n2 5\n3 6\n cube ⍝ 3D array\n 1 2 3 4\n 5 6 7 8\n 9 10 11 12\n\n13 14 15 16\n17 18 19 20\n21 22 23 24\n\n ⍉ cube\n 1 13\n 5 17\n 9 21\n\n 2 14\n 6 18\n10 22\n\n 3 15\n 7 19\n11 23\n\n 4 16\n 8 20\n12 24\n\n ⍴ cube\n2 3 4\n ⍴ ⍉ cube ⍝ transpose reverses shape\n4 3 2\n\n\nDyadic function: Dyadic Transpose\n\n 2 1 3 ⍉ cube ⍝ swap of first two axes\n 1 2 3 4\n13 14 15 16\n\n 5 6 7 8\n17 18 19 20\n\n 9 10 11 12\n21 22 23 24\n\n 1 1 ⍉ mat ⍝ diagonal\n1 5\n 1 1 2 ⍉ cube ⍝ diagonal of first two axes\n 1 2 3 4\n17 18 19 20"],
"¨":["Diaeresis (¨)","Monadic operator: Each (Map)\n\n ⊃¨ 1 2 3 'ABC' (9 8 7)\n1 2 3 A 9\n\n +/¨ (1 2 3 4)(5 6 7)\n10 18\n\n 3 ↑¨ 1 2 (3 4) 'V'\n┌─────┬─────┬─────┬───┐\n│1 0 0│2 0 0│3 4 0│V │\n└─────┴─────┴─────┴───┘\n\n 1 2 3 ,¨ 99\n┌────┬────┬────┐\n│1 99│2 99│3 99│\n└────┴────┴────┘"],
"⍨":["Tilde Diaeresis (⍨)","Monadic operator: Commute (Switch)\n\n 2 ⍴ 3 ⍝ ⍺ ⍴ ⍵\n3 3\n 2 ⍴⍨ 3 ⍝ ⍵ ⍴ ⍺\n2 2 2\n ⍴⍨ 3 ⍝ ⍵ ⍴ ⍵\n3 3 3"],
"⍣":["Star Diaeresis (⍣)","Dyadic operator: Power\n\n cube ⍝ 3D array\nAB\nCD\n\nEF\nGH\n (↓⍣1) cube ⍝ split once\n┌──┬──┐\n│AB│CD│\n├──┼──┤\n│EF│GH│\n└──┴──┘\n (↓⍣2) cube ⍝ split twice\n┌───────┬───────┐\n│┌──┬──┐│┌──┬──┐│\n││AB│CD│││EF│GH││\n│└──┴──┘│└──┴──┘│\n└───────┴───────┘\n\n f ← (32∘+)∘(×∘1.8) ⍝ Fahrenheit from Celsius\n\n f ¯273 ¯40 0 100 ⍝ Fahrenheit\n¯459.4 ¯40 32 212\n\n c ← f⍣¯1 ⍝ Inverse: Celsius from Fahrenheit\n\n c ¯459.4 ¯40 32 212 ⍝ Celsius\n¯273 ¯40 0 100\n\n 1 +∘÷⍣= 1 ⍝ fixpoint: golden mean\n1.61803"],
".":["Dot (.)","Dyadic operator: Product\n\nInner Product f.g\n\n 1 2 3 +.× 4 5 6\n32\n 3 ∧.= 3 3 3 3\n1\n mat\n1 2\n3 4\n mat +.× mat ⍝ matrix product\n 7 10\n15 22\n\nOuter Product ∘.g\n\n 1 2 3 ∘.× 4 5 6 7\n 4 5 6 7\n 8 10 12 14\n12 15 18 21"],
"∘":["Jot (∘)","Dyadic operator: Compose\n\nNB: ∘ is also used in outer product ∘.f - see Dot (.)\n\nForm f∘g (function composition)\n\n ⌽∘⍳¨ 3 4 5\n┌─────┬───────┬─────────┐\n│3 2 1│4 3 2 1│5 4 3 2 1│\n└─────┴───────┴─────────┘\n\n ¯1 ⌽∘⍳¨ 3 4 5\n┌─────┬───────┬─────────┐\n│3 1 2│4 1 2 3│5 1 2 3 4│\n└─────┴───────┴─────────┘\n\n +∘÷/ 40⍴1 ⍝ continued fraction\n1.61803\n\nForm A∘g (left argument currying)\n\n next ← 1∘+\n next 23\n24\n\nForm f∘B (right argument currying)\n\n prev ← -∘1\n prev 23\n22\n sqrt ← *∘0.5\n sqrt 16 81\n4 9"],
"⍤":["Jot Diaeresis (⍤)","Dyadic operator: Rank\n\n cube ⍝ 3D array\n 1 2 3\n 4 5 6\n\n 7 8 9\n10 11 12\n\n (,⍤2) cube\n1 2 3 4 5 6\n7 8 9 10 11 12\n\n cmat ⍝ character matrix\nabc\nzxy\n (⍋⍤1) cmat ⍝ grade-up by row\n1 2 3\n2 3 1\n nmat ⍝ numeric matrix\n1 2 3 4\n5 6 7 8\n9 10 11 12\n\n 10 20 30 (+⍤0 1) nmat ⍝ scalars plus vectors\n11 12 13 14\n25 26 27 28\n39 40 41 42"],
"@":["At (@)","Dyadic operator: At\n\n (0@2 4) 1 2 3 4 5\n1 0 3 0 5\n\n 10 (×@2 4) 1 2 3 4 5\n1 20 3 40 5\n\n (÷@2 4) 1 2 3 4 5\n1 0.5 3 0.25 5\n\n '*'@(2∘|) 1 2 3 4 5 ⍝ Boolean selection 1 0 1 0 1\n* 2 * 4 *\n\n ⌽@(2∘|) 1 2 3 4 5 ⍝ Reversal of sub-array 1 3 5\n5 2 3 4 1"],
"⍞":["Quote Quad (⍞)","Niladic: Character Input/Output\n\n chars ← ⍞ ⍝ input session line\nhello\n chars\nhello\n ⍞ ← 'Name:' ⍝ places text in session\nName:\n ask ← {⍞←⍵ ⋄ (≢⍵)↓⍞} ⍝ prompt for input:\n\n name ← ask¨ 'First: ' 'Second: '\nFirst: John\nSecond: Brown\n\n name\n┌────┬─────┐\n│John│Brown│\n└────┴─────┘"],
"⎕":["Quad (⎕)","Niladic: Evaluated Input/Output\n\n 2+⎕+4\n⎕:\n 8-5\n9\n\n 2+⎕←3+4\n7\n9"],
"⍠":["Quad Colon (⍠)","Dyadic operator: Variant\n\n ('a' ⎕R 'x') 'ABC' ⍝ 'a' replaced with 'x'\nABC\n\n ('a' ⎕R 'x' ⍠ 'IC' 1) 'ABC' ⍝ .. Ignoring Case\nxBC\n\n IgnCase ← ⍠ 'IC' 1\n\n 'a' ⎕R 'x' IgnCase 'ABC'\nxBC"],
"⌸":["Quad Equal (⌸)","Monadic operator: Key\n\n 'Banana' {⍺ ⍵}⌸ 3 1 4 1 5 9\n┌─┬─────┐\n│B│3 │\n├─┼─────┤\n│a│1 1 9│\n├─┼─────┤\n│n│4 5 │\n└─┴─────┘\n 'Banana' {⍺,+/⍵}⌸ 3 1 4 1 5 9\nB 3\na 11\nn 9\n 'Banana' {⍺ ⍵}⌸ 1 2 3 4 5 6\n┌─┬─────┐\n│B│1 │\n├─┼─────┤\n│a│2 4 6│\n├─┼─────┤\n│n│3 5 │\n└─┴─────┘\n {⍺ ⍵}⌸ 'Banana' ⍝ (same as above)\n┌─┬─────┐\n│B│1 │\n├─┼─────┤\n│a│2 4 6│\n├─┼─────┤\n│n│3 5 │\n└─┴─────┘"],
"⌺":["Quad Diamond (⌺)","Dyadic operator: Stencil\n\n mat\n 1 2 3 4\n 5 6 7 8\n 9 10 11 12\n13 14 15 16\n\n ({⊂⍵}⌺3 3) mat\n┌───────┬────────┬────────┬───────┐\n│0 0 0 │0 0 0 │0 0 0 │0 0 0 │\n│0 1 2 │1 2 3 │2 3 4 │3 4 0 │\n│0 5 6 │5 6 7 │6 7 8 │7 8 0 │\n├───────┼────────┼────────┼───────┤\n│0 1 2 │1 2 3 │ 2 3 4│ 3 4 0│\n│0 5 6 │5 6 7 │ 6 7 8│ 7 8 0│\n│0 9 10 │9 10 11 │10 11 12│11 12 0│\n├───────┼────────┼────────┼───────┤\n│0 5 6│ 5 6 7│ 6 7 8│ 7 8 0│\n│0 9 10│ 9 10 11│10 11 12│11 12 0│\n│0 13 14│13 14 15│14 15 16│15 16 0│\n├───────┼────────┼────────┼───────┤\n│0 9 10│ 9 10 11│10 11 12│11 12 0│\n│0 13 14│13 14 15│14 15 16│15 16 0│\n│0 0 0│ 0 0 0│ 0 0 0│ 0 0 0│\n└───────┴────────┴────────┴───────┘\n\n ({+/,⍵}⌺3 3) mat\n14 24 30 22\n33 54 63 45\n57 90 99 69\n46 72 78 54"],
"⌶":["I-Beam (⌶)","Monadic operator: I-Beam\n\nProvides a system-related service\ndetermined by the left-operand value.\n(see Dyalog APL Language Reference Guide)"],
"⍎":["Hydrant (⍎)","Monadic function: Execute\n\n ⍎ '1+1'\n2\n V ← 1 2 3\n ⍎ 'V'\n1 2 3"],
"⍕":["Thorn (⍕)","Monadic function: Format\n\nNB: In the following examples space characters\n are represented by small dots: ···\n\n 4 5 6 ⍝ numeric vector\n4 5 6\n ⍕ 4 5 6 ⍝ equivalent character vector\n4·5·6\n\n mat ⍝ numeric matrix\n1 2 3\n4 5 6\n\n ⍕ mat ⍝ equivalent character matrix\n1·2·3\n4·5·6\n\nDyadic function: Format By Specification\n\nField-width and number of decimal places:\n\n 6 2 ⍕ 3.125 0.002\n··3.13··0.00\n\n 6 2 ⍕ mat\n··1.00··2.00··3.00\n··4.00··5.00··6.00\n\n 6 2 ⍕ 1234 ⍝ (field not wide enough)\n******"],
"⋄":["Diamond (⋄)","Syntax: Statement Separator\n\n Statements are evaluated sequentially\n from left to right.\n\n A←4 ⋄ A←A×3 ⋄ A÷2\n6"],
"⍝":["Lamp (⍝)","Syntax: Comment\n\nText to the right of ⍝ is ignored.\n\n 2+3 ⍝ this is a comment\n5"],
"→":["Right Arrow (→)","Syntax: Branch (Clear suspension)\n\n → Label ⍝ branch to Label:\n → ⎕LC ⍝ resume suspended execution\n → 0 ⍝ exit current function and resume calling line\n → ⍝ clear one stack suspension\n\nBranching is superseded by the more modern\ncontrol structures such as :If ... :EndIf"],
"⍵":["Omega (⍵)","Omega Syntax: Right argument of a dfn\n\n 2 {⍵+1} 5\n6\n\nDouble-Omega Syntax: Right operand of a dop\n\n 3 +{⍺ ⍵⍵ ⍵}× 4\n12"],
"⍺":["Alpha (⍺)","Alpha Syntax: Left argument of a dfn\n\n 2 {⍺+1} 5\n3\nDouble-Alpha Syntax: Left Operand of a dop\n\n 3 +{⍺ ⍺⍺ ⍵} 4\n7"],
"∇":["Del (∇)","Del Syntax: dfn self-reference (recursion)\n\n fact←{ ⍝ Factorial ⍵.\n ⍵≤1: 1 ⍝ small ⍵: finished\n ⍵×∇ ⍵-1 ⍝ otherwise: recurse\n }\n\nDouble-Del Syntax: dop self-reference\n\n pow←{ ⍝ power operator: apply ⍵⍵ times\n ⍵⍵=0:⍵ ⍝ ⍵⍵ is 0: finished\n ⍺⍺ ∇∇(⍵⍵-1)⍺⍺ ⍵ ⍝ otherwise: recurse\n }"],
"&":["Ampersand (&)","Monadic operator: Spawn\n\n delay←{'Delayed: ',⎕DL ⍵} ⍝ delay function\n\n delay 10 ⍝ delay for 10 seconds\nDelayed: 10.2228\n\n ⎕←delay&10 ⍝ delay for 10 seconds in new thread 1\n1\n\n 2+3 4 ⍝ execute something in current thread\n5 6\n ⍝ thread 1 completes:\nDelayed: 10.03183"],
"¯":["High Minus (¯)","Qualifier for negative number\n\n 1 + ¯1 0 1 ¯3\n0 1 2 ¯2\n\n 3e¯2\n0.03"],
"⍬":["Zilde (⍬)","Niladic: Empty Numeric Vector\n\n ⍬≡⍳0\n1\n ⍬≡0⍴0\n1\n ⍬≡0 0⍴0\n0\n ⍬≡''\n0"]
}
}