blob: 2cdfe2b6c3a3572f3e5c5f7b0a8f5d791b16d6aa (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
#!/usr/bin/env bqn
thing ← {
data ← •FLines 𝕩
names ← (⊣∾", "∾⊢)´{(¬·∧`' '⊸=)⊸/⌾⌽(2+⊑/':'=𝕩)↓𝕩}¨("## "≡3⊸↑)¨⊸/data
t‿d ← ∾/¨(⊏data)=¨"()"
sym ← (+`·»⊸-˝(¬»∧«)∘=⟜'`'∧⎉1"()"=⌜⊢)⊸/ 2⊑data
sym (1+'|'⊸=)⊸(/+(-´"\|")×{«⊒/𝕨})↩
"| " ∾ sym ∾ " | [" ∾ names ∾ "]("∾𝕩∾ ") |"
}¨•args(¬∘∊/⊣)⟨"README.md"⟩
head ← ⟨
"*View this file with results and syntax highlighting [here](https://mlochbaum.github.io/BQN/help/index.html).*"
⟨⟩
"# REPL Help"
⟨⟩
"Symbols are listed in alphabetical order of page name, ignoring syntactical roles."
⟨⟩
"| Symbol | Link |"
"|--------|------|"
⟩
"README.md" •FLines head ∾ thing #rename once you have a proper file.
|