aboutsummaryrefslogtreecommitdiff
path: root/tutorial/prim.bqn
diff options
context:
space:
mode:
Diffstat (limited to 'tutorial/prim.bqn')
-rw-r--r--tutorial/prim.bqn11
1 files changed, 11 insertions, 0 deletions
diff --git a/tutorial/prim.bqn b/tutorial/prim.bqn
new file mode 100644
index 00000000..0b2269e9
--- /dev/null
+++ b/tutorial/prim.bqn
@@ -0,0 +1,11 @@
+# Show keys and names for primitives
+# Input is a list of "glyph%keys%Monad%Dyad" strings
+
+Primitives ← {
+ Row ← {
+ s ← ¯1⊸↓⌾(¯1⊸⊑) ((+`׬)⊸-'%'⊸=)⊸⊔ 𝕩∾" "
+ t ← ⟨0⊸Highlight, ("kbd"Enc"\"⊸∾)⍟≠⟩⊸({𝕎𝕩}¨)⌾(2⊸↑) s
+ "tr" Enc ((3<≠s)◶⟨2⊸/∾∾⟜" colspan='2'"¨,4⊸/⟩ ⟨"td"⟩) Enc¨ t
+ }
+ "table class='primitives'" Enc Row¨ 𝕩
+}