--- title: "First functions" author: "Jeremy Howard" date: "2022-07-05" categories: [Dyalog, APL, Glyphs] --- ]box on -style=max -trains=tree -fns=on 1 = 1 1 = 1 2 1 = 1 1 'Banana' = 'aaaaaa' 'Banana' = 'a' 'Banana' 'Apple' 'Candy' = 'a' ≠22 10 22 22 21 10 5 10 ≠ 'Banana' ≠ 'Mississippi' 1 2 3 ≠ 4 2 ¯1 7 ≠ '7' 1 2 3 < 4 2 ¯1 1 2 3 < 2 1 2 3 > 4 2 ¯1 1 2 3 > 2 1 2 3 ≤ 4 2 ¯1 1 2 3 ≤ 2 1 2 3 ≥ 4 2 ¯1 1 2 3 ≥ 2 ≡ 7 ≡ 'abc' (1 2)(3 4) ≡ (1 2)(3 4) (1 2)(3 4) (5 (6 7)) ≡ (1 2)(3 4) (5 (6 7)) 1 ≡ 1 1 ≡ 0 1 ≡ 1 1 ≢ 1 2 3 ⍴ 1 2 3 ≢ 2 3 ⍴ ⍳6 ≢ 3 2 ⍴ ⍳6 1 ≢ 1 1 ≢ 0 1 ≢ 1 1 0 1 0 1 ∨ 0 0 1 1 ⍝ Truth table for *or* 15 1 2 7 ∨ 35 1 4 0 ⍝ GCD 0 1 0 1 ⍱ 0 0 1 1 ⍝ Truth table for *nor* 0 1 0 1 ∧ 0 0 1 1 ⍝ Truth table for *and* 15 1 2 7 ∧ 35 1 4 0 ⍝ LCM ~ 0 1 ⍝ Truth table for *not* 3 1 4 1 5 ~ 5 1 'aa' 'bb' 'cc' 'bb' ~ 'bb' 'xx' (1 2) 3 ~ ⊂1 2 0 1 0 1 ⍲ 0 0 1 1 ⍝ Truth table for *nand* ~ 0 1 0 1 ∧ 0 0 1 1 ⍝ Truth table for *nand* v←22 10 22 22 21 10 5 10 ≠v (≠v)/v 3 1 3 1 3 1 / 'Banana' ⍳4 ⍳2 3 2 3 ⍴ ⍳6 1+2×⍳6 ⍳0 1 3 6 5 4 ⍳ 3 'ABCDABCDEF' ⍳ 'ACFG' ⎕←mat←3 2 ⍴ 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