21
A celebration of the many faces of APL
Given a string among those in column 1 or column 2 of the below table, return the string's neighbor to its right. In other words, if given a string in column 1 then return column 2's string on that row, and if given a string in column 2 then return column 3's string on that row.
The codepoints (other than :
's) are listed on the far right.
column 1 column 2 column 3
:⊢
→ ⍡
→ ⊣:
U+22a2 U+2361 U+22a3
:▷
→ ⍢
→ ◁:
U+25b7 U+2362 U+25c1
:⋆
→ ⍣
→ ⋆:
U+22c6 U+2363 U+22c6
:∘
→ ⍤
→ ∘:
U+2218 U+2364 U+2218
:○
→ ⍥
→ ○:
U+25cb U+2365 U+25cb
:≀
→ ⍨
→ ≀:
U+2240 U+2368 U+2240
:∧
→ ⍩
→ ∨:
U+2227 U+2369 U+2228
Anecdote: Most of these symbols are valid or proposed in some APL dialect (they are all links).
Per request, just the symbols:
:⊢ ⍡ ⊣:
:▷ ⍢ ◁:
:⋆ ⍣ ⋆:
:∘ ⍤ ∘:
:○ ⍥ ○:
:≀ ⍨ ≀:
:∧ ⍩ ∨:
Wanted to ask, is it valid to just omit the obvious scaffolding (class Program, static void Main) you need from the byte count? I typically use JVM languages and of course it would be cool if I could just omit the class/main function declaration and just count the meat of my code, but I'm not sure if this is the case. – Matej – 2017-06-22T11:36:06.140
1@Matej Standard code golf rules allow submission of a function/lambda or a full program. – Adam Martin – 2017-06-22T11:48:15.053