aboutsummaryrefslogtreecommitdiff
path: root/bqn.bqn
diff options
context:
space:
mode:
Diffstat (limited to 'bqn.bqn')
-rw-r--r--bqn.bqn20
1 files changed, 20 insertions, 0 deletions
diff --git a/bqn.bqn b/bqn.bqn
new file mode 100644
index 00000000..00c62cb4
--- /dev/null
+++ b/bqn.bqn
@@ -0,0 +1,20 @@
+# BQN hosted in dzaima/BQN
+# Result is a function that executes BQN code.
+
+⟨DRun,DCompile⟩ ← •Import "dc.bqn"
+⟨ref,glyphs⟩ ← •Import "src/pr.bqn"
+
+PrimInd ← {⊑rt⊐<𝕩}
+Decompose ← ((≠glyphs)>PrimInd)◶⟨•Decompose,0⊸≍⟩
+provide ← ⟨
+ •Type # Type
+ Decompose # Decompose
+ glyphs⊑˜PrimInd # Glyph
+ •FillFn # Fill
+ ⋆⁼ # Log
+ ≠¨⊔ # GroupLen
+ ∾⊔∘⊢ # GroupOrd
+ !,+,-,×,÷,⋆,⌊,=,≤,≢,⥊,⊑,↕,⌜,`,•_fillBy_,⊘
+⟩
+rt ← •COMP provide⊸(⊣»«)⌾(1⊸⊑) DCompile ref
+rt⊸DRun