diff options
| author | Marshall Lochbaum <mwlochbaum@gmail.com> | 2022-01-19 15:10:38 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-01-19 15:10:38 -0500 |
| commit | ce364aeae795ca8a8e46e653b8024ac5a9ad0982 (patch) | |
| tree | 7af238dbdb370a768f965066dadadd144cbd70f7 /docs/help/prefixes_take.html | |
| parent | 8f0aa14fa695ff3aa3b3ed96c02fdb2ab99f272c (diff) | |
| parent | edddb9be0aa1f03c8608d3dabf7ccfea3fdde206 (diff) | |
Merge pull request #55 from razetime/master
Simple help pages for Primitive Symbols
Diffstat (limited to 'docs/help/prefixes_take.html')
| -rw-r--r-- | docs/help/prefixes_take.html | 56 |
1 files changed, 56 insertions, 0 deletions
diff --git a/docs/help/prefixes_take.html b/docs/help/prefixes_take.html new file mode 100644 index 00000000..61d27740 --- /dev/null +++ b/docs/help/prefixes_take.html @@ -0,0 +1,56 @@ +<head> + <link href="../favicon.ico" rel="shortcut icon" type="image/x-icon"/> + <link href="../style.css" rel="stylesheet"/> + <title>BQN: Up Arrow (`โ`)</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="up-arrow-"><a class="header" href="#up-arrow-">Up Arrow (<code><span class='Function'>โ</span></code>)</a></h1> +<h2 id="--prefixes"><a class="header" href="#--prefixes"><code><span class='Function'>โ</span> <span class='Value'>๐ฉ</span></code>: Prefixes</a></h2> +<p>Prefixes of array <code><span class='Value'>๐ฉ</span></code> along its first axis.</p> +<a class="replLink" title="Open in the REPL" target="_blank" href="https://mlochbaum.github.io/BQN/try.html#code=ICAg4oaRIDHigL8y4oC/M+KAvzQKCiAgIGEg4oaQIDPigL8zIOKliiDihpU5CgogICDihpEgYQ==">โ๏ธ</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><span class='Ligature'>โฟ</span><span class='Number'>4</span> +โจ โจโฉ โจ 1 โฉ โจ 1 2 โฉ โจ 1 2 3 โฉ โจ 1 2 3 4 โฉ โฉ + + <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> +โโ +ยท โ0โฟ3 โโ โโ โโ + โต 0 1 2 โต 0 1 2 โต 0 1 2 + โ 3 4 5 3 4 5 + โ 6 7 8 + โ + โ +</pre> +<h2 id="---take"><a class="header" href="#---take"><code><span class='Value'>๐จ</span> <span class='Function'>โ</span> <span class='Value'>๐ฉ</span></code>: Take</a></h2> +<p>For each integer in <code><span class='Value'>๐จ</span></code>, take that many elements from each dimension of <code><span class='Value'>๐ฉ</span></code>.</p> +<p>Negative numbers take from the end.</p> +<p>If any of the elements in <code><span class='Value'>๐จ</span></code> are greater than the length of their respective dimension, the dimension is extended with a fill value.</p> +<a class="replLink" title="Open in the REPL" target="_blank" href="https://mlochbaum.github.io/BQN/try.html#code=ICAzIOKGkSAx4oC/M+KAvzXigL82NwoKICBhIOKGkCA04oC/NCDipYog4oaVMTYKCiAgM+KAvzMg4oaRIGEKCiAgNeKAvzUg4oaRIGEKCiAgM+KAv8KvMyDihpEgYQ==">โ๏ธ</a><pre> <span class='Number'>3</span> <span class='Function'>โ</span> <span class='Number'>1</span><span class='Ligature'>โฟ</span><span class='Number'>3</span><span class='Ligature'>โฟ</span><span class='Number'>5</span><span class='Ligature'>โฟ</span><span class='Number'>67</span> +โจ 1 3 5 โฉ + + <span class='Value'>a</span> <span class='Gets'>โ</span> <span class='Number'>4</span><span class='Ligature'>โฟ</span><span class='Number'>4</span> <span class='Function'>โฅ</span> <span class='Function'>โ</span><span class='Number'>16</span> +<span class='Error'>Error: Redefinition</span> + + <span class='Number'>3</span><span class='Ligature'>โฟ</span><span class='Number'>3</span> <span class='Function'>โ</span> <span class='Value'>a</span> +โโ +โต 0 1 2 + 3 4 5 + 6 7 8 + โ + + <span class='Number'>5</span><span class='Ligature'>โฟ</span><span class='Number'>5</span> <span class='Function'>โ</span> <span class='Value'>a</span> +โโ +โต 0 1 2 0 0 + 3 4 5 0 0 + 6 7 8 0 0 + 0 0 0 0 0 + 0 0 0 0 0 + โ + + <span class='Number'>3</span><span class='Ligature'>โฟ</span><span class='Number'>ยฏ3</span> <span class='Function'>โ</span> <span class='Value'>a</span> +โโ +โต 0 1 2 + 3 4 5 + 6 7 8 + โ +</pre> |
