aboutsummaryrefslogtreecommitdiff
path: root/bqn.bqn
blob: b40eb8622ba89f21c3fd151d4a37e6e62c522e3a (plain)
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
# BQN hosted in dzaima/BQN
# Result is a function that executes BQN code.

ref,prims  •Import "src/pr.bqn"
DRun            •Import "dc.bqn"
DCompile  prims •Import "dc.bqn"
glyphs   •Import "src/glyphs.bqn"

provide  
  •Type           # Type
  •FillFn         # Fill
                # Log
  {(𝕨⌈≠)↑≠¨𝕩}   # GroupLen
  ∾⊔            # GroupOrd
  !,+,-,×,÷,,,=,,,,,,,`,•_fillBy_,,

rtSetPrims  •COMP provide DCompile ref
PrimInd  rt<
Decompose  ((glyphs)>PrimInd)•Decompose,0
SetPrims  Decompose, PrimInd 

sys  {𝕩˜𝕨}˝⍉>
  "bqn"{BQN𝕩}
  "type"•Type
  "glyph"(glyphs˜PrimInd)
  "decompose"Decompose

BQN  rt,SysDRun