Skip to content

Commit 1c18950

Browse files
committed
Add [] to keybar and help
1 parent 72bf976 commit 1c18950

File tree

7 files changed

+69
-2
lines changed

7 files changed

+69
-2
lines changed

docs/help/beginarray.html

+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
<head>
2+
<link href="../favicon.ico" rel="shortcut icon" type="image/x-icon"/>
3+
<link href="../style.css" rel="stylesheet"/>
4+
<title>BQN: Left Square Bracket ([)</title>
5+
</head>
6+
<div class="nav">(<a href="https://github.com/mlochbaum/BQN">github</a>) / <a href="../index.html">BQN</a> / <a href="index.html">help</a></div>
7+
<h1 id="left-square-bracket-"><a class="header" href="#left-square-bracket-">Left Square Bracket (<code><span class='Bracket'>[</span></code>)</a></h1>
8+
<h2 id="--begin-array"><a class="header" href="#--begin-array"><code><span class='Bracket'>[</span> <span class='Value'>...</span></code>: Begin array</a></h2>
9+
<p><a class="fulldoc" href="../doc/arrayrepr.html#high-rank-arrays">→full documentation</a></p>
10+
<p>Starts a high-rank array. Entries must be separated by <code><span class='Separator'>,</span></code> or <code><span class='Separator'></span></code>. These must have the same shape. They become major cells of the result.</p>
11+
<p>Must end with a corresponding <code><span class='Bracket'>]</span></code>.</p>
12+
<a class="replLink" title="Open in the REPL" target="_blank" href="https://mlochbaum.github.io/BQN/try.html#code=WyJhYmMiLCAiZGVmIl0KClvihpU0LCDihpU1XQ==">↗️</a><pre> <span class='Bracket'>[</span><span class='String'>&quot;abc&quot;</span><span class='Separator'>,</span> <span class='String'>&quot;def&quot;</span><span class='Bracket'>]</span>
13+
┌─
14+
╵"abc
15+
def"
16+
17+
18+
<span class='Bracket'>[</span><span class='Function'></span><span class='Number'>4</span><span class='Separator'>,</span> <span class='Function'></span><span class='Number'>5</span><span class='Bracket'>]</span>
19+
<span class='Error'>Error: >: Elements didn't have equal shapes (contained shapes ⟨4⟩ and ⟨5⟩)</span>
20+
</pre>

docs/help/endarray.html

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
<head>
2+
<link href="../favicon.ico" rel="shortcut icon" type="image/x-icon"/>
3+
<link href="../style.css" rel="stylesheet"/>
4+
<title>BQN: Right Square Bracket (])</title>
5+
</head>
6+
<div class="nav">(<a href="https://github.com/mlochbaum/BQN">github</a>) / <a href="../index.html">BQN</a> / <a href="index.html">help</a></div>
7+
<h1 id="right-square-bracket-"><a class="header" href="#right-square-bracket-">Right Square Bracket (<code><span class='Bracket'>]</span></code>)</a></h1>
8+
<h2 id="--end-array"><a class="header" href="#--end-array"><code><span class='Value'>...</span> <span class='Bracket'>]</span></code>: End array</a></h2>
9+
<p><a class="fulldoc" href="../doc/arrayrepr.html#high-rank-arrays">→full documentation</a></p>
10+
<p>Ends an array started by a <code><span class='Bracket'>[</span></code>. See <a href="beginarray.html">Begin Array</a> for more details.</p>
11+
<a class="replLink" title="Open in the REPL" target="_blank" href="https://mlochbaum.github.io/BQN/try.html#code=WyJhYmMiLCAiZGVmIl0KClvihpU0LCDihpU1XQ==">↗️</a><pre> <span class='Bracket'>[</span><span class='String'>&quot;abc&quot;</span><span class='Separator'>,</span> <span class='String'>&quot;def&quot;</span><span class='Bracket'>]</span>
12+
┌─
13+
╵"abc
14+
def"
15+
16+
17+
<span class='Bracket'>[</span><span class='Function'></span><span class='Number'>4</span><span class='Separator'>,</span> <span class='Function'></span><span class='Number'>5</span><span class='Bracket'>]</span>
18+
<span class='Error'>Error: >: Elements didn't have equal shapes (contained shapes ⟨4⟩ and ⟨5⟩)</span>
19+
</pre>

docs/repl.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ let typeChar = (t, c, ev) => {
159159
}
160160

161161
let syncls={ v:"Value", f:"Function", m:"Modifier", d:"Modifier2", n:"Number", g:"Gets", p:"Paren", b:"Bracket", k:"Brace", h:"Head", l:"Ligature", n:"Nothing", s:"Separator", c:"Comment", a:"String" };
162-
let keydesc='f+Conjugate;Add_f-Negate;Subtract_f×Sign;Multiply_f÷Reciprocal;Divide_f⋆Exponential;Power_f√Square Root;Root_f⌊Floor;Minimum_f⌈Ceiling;Maximum_f∧Sort Up;And_f∨Sort Down;Or_f¬Not;Span_f|Absolute Value;Modulus_f≤Less Than or Equal to_f<Enclose;Less Than_f>Merge;Greater Than_f≥Greater Than or Equal to_f=Rank;Equals_f≠Length;Not Equals_f≡Depth;Match_f≢Shape;Not Match_f⊣Identity;Left_f⊢Identity;Right_f⥊Deshape;Reshape_f∾Join;Join to_f≍Solo;Couple_f⋈Enlist;Pair_f↑Prefixes;Take_f↓Suffixes;Drop_f↕Range;Windows_f«Shift Before_f»Shift After_f⌽Reverse;Rotate_f⍉Transpose;Reorder axes_f/Indices;Replicate_f⍋Grade Up;Bins Up_f⍒Grade Down;Bins Down_f⊏First Cell;Select_f⊑First;Pick_f⊐Classify;Index of_f⊒Occurrence Count;Progressive Index of_f∊Mark First;Member of_f⍷Deduplicate;Find_f⊔Group Indices;Group_f!Assert;Assert with message_m˙Constant_m˜Self/Swap_d∘Atop_d○Over_d⊸Before/Bind_d⟜After/Bind_d⌾Under_d⊘Valences_d◶Choose_d⎊Catch_d⎉Rank_m˘Cells_d⚇Depth_m¨Each_m⌜Table_d⍟Repeat_m⁼Undo_m´Fold_m˝Insert_m`Scan_g←Define_g⇐Export_g↩Change_s⋄Separator_s,Separator_v.Namespace field_p(Begin expression_p)End expression_k{Begin block_k}End block_h;Next body_h:Header_h?Predicate_b⟨Begin list_b⟩End list_l‿Strand_n·Nothing_v•System_v𝕨Left argument_f𝕎Left argument (as function)_v𝕩Right argument_f𝕏Right argument (as function)_v𝕗Modifier left operand (as subject)_f𝔽Modifier left operand_v𝕘2-modifier right operand (as subject)_f𝔾2-modifier right operand_v𝕤Current function (as subject)_f𝕊Current function_m𝕣Current modifier_n¯Minus_nπPi_n∞Infinity_a@Null character_a\'Character_a\"String_c#Comment'.split(/[\n_]/);
162+
let keydesc='f+Conjugate;Add_f-Negate;Subtract_f×Sign;Multiply_f÷Reciprocal;Divide_f⋆Exponential;Power_f√Square Root;Root_f⌊Floor;Minimum_f⌈Ceiling;Maximum_f∧Sort Up;And_f∨Sort Down;Or_f¬Not;Span_f|Absolute Value;Modulus_f≤Less Than or Equal to_f<Enclose;Less Than_f>Merge;Greater Than_f≥Greater Than or Equal to_f=Rank;Equals_f≠Length;Not Equals_f≡Depth;Match_f≢Shape;Not Match_f⊣Identity;Left_f⊢Identity;Right_f⥊Deshape;Reshape_f∾Join;Join to_f≍Solo;Couple_f⋈Enlist;Pair_f↑Prefixes;Take_f↓Suffixes;Drop_f↕Range;Windows_f«Shift Before_f»Shift After_f⌽Reverse;Rotate_f⍉Transpose;Reorder axes_f/Indices;Replicate_f⍋Grade Up;Bins Up_f⍒Grade Down;Bins Down_f⊏First Cell;Select_f⊑First;Pick_f⊐Classify;Index of_f⊒Occurrence Count;Progressive Index of_f∊Mark First;Member of_f⍷Deduplicate;Find_f⊔Group Indices;Group_f!Assert;Assert with message_m˙Constant_m˜Self/Swap_d∘Atop_d○Over_d⊸Before/Bind_d⟜After/Bind_d⌾Under_d⊘Valences_d◶Choose_d⎊Catch_d⎉Rank_m˘Cells_d⚇Depth_m¨Each_m⌜Table_d⍟Repeat_m⁼Undo_m´Fold_m˝Insert_m`Scan_g←Define_g⇐Export_g↩Change_s⋄Separator_s,Separator_v.Namespace field_p(Begin expression_p)End expression_k{Begin block_k}End block_h;Next body_h:Header_h?Predicate_b⟨Begin list_b⟩End list_b[Begin array_b]End array_l‿Strand_n·Nothing_v•System_v𝕨Left argument_f𝕎Left argument (as function)_v𝕩Right argument_f𝕏Right argument (as function)_v𝕗Modifier left operand (as subject)_f𝔽Modifier left operand_v𝕘2-modifier right operand (as subject)_f𝔾2-modifier right operand_v𝕤Current function (as subject)_f𝕊Current function_m𝕣Current modifier_n¯Minus_nπPi_n∞Infinity_a@Null character_a\'Character_a\"String_c#Comment'.split(/[\n_]/);
163163
let kk=Array.from('`123456890-=~!@#$%^&*()_+qwertuiop[]QWERTIOP{}asdfghjkl;ASFGHKL:"zxcvbm,./ZXVBM<>? \'');
164164
let kv=Array.from('˜˘¨⁼⌜´˝∞¯•÷׬⎉⚇⍟◶⊘⎊⍎⍕⟨⟩√⋆⌽𝕨∊↑∧⊔⊏⊐π←→↙𝕎⍷𝕣⍋⊑⊒⍳⊣⊢⍉𝕤↕𝕗𝕘⊸∘○⟜⋄↖𝕊𝔽𝔾«⌾»·˙⥊𝕩↓∨⌊≡∾≍≠⋈𝕏⍒⌈≢≤≥⇐‿↩');
165165
let keys={}, revkeys={}, primhelp={}, helpurl={};

help/README.md

+2
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,8 @@
8282
| `?` | [Predicate](predicate.md) |
8383
| `` | [Begin list](beginlist.md) |
8484
| `` | [End list](endlist.md) |
85+
| `[` | [Begin array](beginarray.md) |
86+
| `]` | [End array](endarray.md) |
8587
| `` | [Strand](strand.md) |
8688
| `·` | [Nothing](nothing.md) |
8789
| `` | [System](system.md) |

help/beginarray.md

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
*View this file with results and syntax highlighting [here](https://mlochbaum.github.io/BQN/help/beginarray.html).*
2+
3+
# Left Square Bracket (`[`)
4+
5+
## `[ ...`: Begin array
6+
[→full documentation](../doc/arrayrepr.md#high-rank-arrays)
7+
8+
Starts a high-rank array. Entries must be separated by `,` or ``. These must have the same shape. They become major cells of the result.
9+
10+
Must end with a corresponding `]`.
11+
12+
["abc", "def"]
13+
14+
[↕4, ↕5]

help/endarray.md

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
*View this file with results and syntax highlighting [here](https://mlochbaum.github.io/BQN/help/endarray.html).*
2+
3+
# Right Square Bracket (`]`)
4+
5+
## `... ]`: End array
6+
[→full documentation](../doc/arrayrepr.md#high-rank-arrays)
7+
8+
Ends an array started by a `[`. See [Begin Array](beginarray.md) for more details.
9+
10+
["abc", "def"]
11+
12+
[↕4, ↕5]

help/genhelp.bqn

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#!/usr/bin/env bqn
22

33
files"README.md"¨/ ((¬∊"_.")/¨) ".md"(-↑≡⊣)¨/ •file.List ""
4-
gl"+-×÷⋆√⌊⌈∧∨¬|≤<>≥=≠≡≢⊣⊢⥊∾≍⋈↑↓↕«»⌽⍉/⍋⍒⊏⊑⊐⊒∊⍷⊔!˙˜∘○⊸⟜⌾⊘◶⎊⎉˘⚇¨⌜⍟⁼´˝`←⇐↩⋄,.(){};:?⟨⟩‿·•𝕨𝕎𝕩𝕏𝕗𝔽𝕘𝔾𝕤𝕊𝕣¯π∞@#"
4+
gl"+-×÷⋆√⌊⌈∧∨¬|≤<>≥=≠≡≢⊣⊢⥊∾≍⋈↑↓↕«»⌽⍉/⍋⍒⊏⊑⊐⊒∊⍷⊔!˙˜∘○⊸⟜⌾⊘◶⎊⎉˘⚇¨⌜⍟⁼´˝`←⇐↩⋄,.(){};:?⟨⟩[]‿·•𝕨𝕎𝕩𝕏𝕗𝔽𝕘𝔾𝕤𝕊𝕣¯π∞@#"
55

66
rows ← (gl)˝⍉> {
77
data•FLines 𝕩

0 commit comments

Comments
 (0)