aboutsummaryrefslogtreecommitdiff
path: root/docs/help/reverse_rotate.html
blob: 538005c9d85aabee176783b3291e6ab836e727c2 (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
29
30
31
32
33
34
35
<head>
  <link href="../favicon.ico" rel="shortcut icon" type="image/x-icon"/>
  <link href="../style.css" rel="stylesheet"/>
  <title>BQN: Circle Stile (⌽)</title>
</head>
<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>
<h1 id="circle-stile-"><a class="header" href="#circle-stile-">Circle Stile (<code><span class='Function'></span></code>)</a></h1>
<h2 id="-𝕩-reverse"><a class="header" href="#-𝕩-reverse"><code><span class='Function'></span> <span class='Value'>𝕩</span></code>: Reverse</a></h2>
<p>Reverse <code><span class='Value'>𝕩</span></code> along the first axis.</p>
<a class="replLink" title="Open in the REPL" target="_blank" href="https://mlochbaum.github.io/BQN/try.html#code=ICAg4oy9IDHigL8y4oC/MwoKICAgYSDihpAgM+KAvzMg4qWKIOKGlTkKCiAgIOKMvSBh">↗️</a><pre>       <span class='Function'></span> <span class='Number'>1</span><span class='Ligature'></span><span class='Number'>2</span><span class='Ligature'></span><span class='Number'>3</span>
⟨ 3 2 1 ⟩

       <span class='Value'>a</span> <span class='Gets'></span> <span class='Number'>3</span><span class='Ligature'></span><span class='Number'>3</span> <span class='Function'></span> <span class='Function'></span><span class='Number'>9</span>

       <span class='Function'></span> <span class='Value'>a</span>
┌─       
╵ 6 7 8  
  3 4 5  
  0 1 2  
        ┘
</pre>
<h2 id="𝕨--𝕩-rotate"><a class="header" href="#𝕨--𝕩-rotate"><code><span class='Value'>𝕨</span> <span class='Function'></span> <span class='Value'>𝕩</span></code>: Rotate</a></h2>
<p>Move the first <code><span class='Value'>𝕨</span></code> elements of <code><span class='Value'>𝕩</span></code> to its end. Negative <code><span class='Value'>𝕨</span></code> reverses the direction of rotation.</p>
<a class="replLink" title="Open in the REPL" target="_blank" href="https://mlochbaum.github.io/BQN/try.html#code=ICAgMiDijL0gMeKAvzLigL8zCgogICBiIOKGkCAz4oC/MyDipYog4oaVOQoKICAgMiDijL0gYg==">↗️</a><pre>       <span class='Number'>2</span> <span class='Function'></span> <span class='Number'>1</span><span class='Ligature'></span><span class='Number'>2</span><span class='Ligature'></span><span class='Number'>3</span>
⟨ 3 1 2 ⟩

       <span class='Value'>b</span> <span class='Gets'></span> <span class='Number'>3</span><span class='Ligature'></span><span class='Number'>3</span> <span class='Function'></span> <span class='Function'></span><span class='Number'>9</span>

       <span class='Number'>2</span> <span class='Function'></span> <span class='Value'>b</span>
┌─       
╵ 6 7 8  
  0 1 2  
  3 4 5  
        ┘
</pre>