From 1c18950453d3b4281c921fdb79f80fe4bec6ec3e Mon Sep 17 00:00:00 2001 From: Marshall Lochbaum Date: Thu, 23 Jun 2022 16:53:49 -0400 Subject: Add [] to keybar and help --- help/README.md | 2 ++ help/beginarray.md | 14 ++++++++++++++ help/endarray.md | 12 ++++++++++++ help/genhelp.bqn | 2 +- 4 files changed, 29 insertions(+), 1 deletion(-) create mode 100644 help/beginarray.md create mode 100644 help/endarray.md (limited to 'help') diff --git a/help/README.md b/help/README.md index 6e074c95..d7b0b3ae 100644 --- a/help/README.md +++ b/help/README.md @@ -82,6 +82,8 @@ | `?` | [Predicate](predicate.md) | | `⟨` | [Begin list](beginlist.md) | | `⟩` | [End list](endlist.md) | +| `[` | [Begin array](beginarray.md) | +| `]` | [End array](endarray.md) | | `‿` | [Strand](strand.md) | | `·` | [Nothing](nothing.md) | | `•` | [System](system.md) | diff --git a/help/beginarray.md b/help/beginarray.md new file mode 100644 index 00000000..a8e64c33 --- /dev/null +++ b/help/beginarray.md @@ -0,0 +1,14 @@ +*View this file with results and syntax highlighting [here](https://mlochbaum.github.io/BQN/help/beginarray.html).* + +# Left Square Bracket (`[`) + +## `[ ...`: Begin array +[→full documentation](../doc/arrayrepr.md#high-rank-arrays) + +Starts a high-rank array. Entries must be separated by `,` or `⋄`. These must have the same shape. They become major cells of the result. + +Must end with a corresponding `]`. + + ["abc", "def"] + + [↕4, ↕5] diff --git a/help/endarray.md b/help/endarray.md new file mode 100644 index 00000000..797837da --- /dev/null +++ b/help/endarray.md @@ -0,0 +1,12 @@ +*View this file with results and syntax highlighting [here](https://mlochbaum.github.io/BQN/help/endarray.html).* + +# Right Square Bracket (`]`) + +## `... ]`: End array +[→full documentation](../doc/arrayrepr.md#high-rank-arrays) + +Ends an array started by a `[`. See [Begin Array](beginarray.md) for more details. + + ["abc", "def"] + + [↕4, ↕5] diff --git a/help/genhelp.bqn b/help/genhelp.bqn index 20cb66e8..5b11366b 100755 --- a/help/genhelp.bqn +++ b/help/genhelp.bqn @@ -1,7 +1,7 @@ #!/usr/bin/env bqn files ← "README.md"⊸≢¨⊸/ (⍋(¬∊⟜"_.")⊸/¨)⊸⊏ ".md"⊸(-∘≠⊸↑≡⊣)¨⊸/ •file.List "" -gl ← "+-×÷⋆√⌊⌈∧∨¬|≤<>≥=≠≡≢⊣⊢⥊∾≍⋈↑↓↕«»⌽⍉/⍋⍒⊏⊑⊐⊒∊⍷⊔!˙˜∘○⊸⟜⌾⊘◶⎊⎉˘⚇¨⌜⍟⁼´˝`←⇐↩⋄,.(){};:?⟨⟩‿·•𝕨𝕎𝕩𝕏𝕗𝔽𝕘𝔾𝕤𝕊𝕣¯π∞@#" +gl ← "+-×÷⋆√⌊⌈∧∨¬|≤<>≥=≠≡≢⊣⊢⥊∾≍⋈↑↓↕«»⌽⍉/⍋⍒⊏⊑⊐⊒∊⍷⊔!˙˜∘○⊸⟜⌾⊘◶⎊⎉˘⚇¨⌜⍟⁼´˝`←⇐↩⋄,.(){};:?⟨⟩[]‿·•𝕨𝕎𝕩𝕏𝕗𝔽𝕘𝔾𝕤𝕊𝕣¯π∞@#" rows ← (⍋gl⊸⊐)⊸⊏˝⍉> { data ← •FLines 𝕩 -- cgit v1.2.3