aboutsummaryrefslogtreecommitdiff
path: root/docs/help/leftargument.html
blob: 58c60486d1dca850496e7ec41a56e7cb7cbab203 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
<head>
  <link href="../favicon.ico" rel="shortcut icon" type="image/x-icon"/>
  <link href="../style.css" rel="stylesheet"/>
  <title>BQN: Mathematical Double-struck W (๐•จ)</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="mathematical-double-struck-w-๐•จ"><a class="header" href="#mathematical-double-struck-w-๐•จ">Mathematical Double-struck W (<code><span class='Value'>๐•จ</span></code>)</a></h1>
<h2 id="๐•จ-left-argument"><a class="header" href="#๐•จ-left-argument"><code><span class='Value'>๐•จ</span></code>: Left Argument</a></h2>
<p><a class="fulldoc" href="../doc/syntax.html#blocks">โ†’full documentation</a></p>
<p>A variable assigned to the left argument of a block. <code><span class='Function'>๐•Ž</span></code> can be used to access the left argument as a function.</p>
<a class="replLink" title="Open in the REPL" target="_blank" href="https://mlochbaum.github.io/BQN/try.html#code=NSB78J2VqH0gMQoKLeKAv8O3IHvwnZWO8J2VqX3CqCA0">โ†—๏ธ</a><pre>    <span class='Number'>5</span> <span class='Brace'>{</span><span class='Value'>๐•จ</span><span class='Brace'>}</span> <span class='Number'>1</span>
5

    <span class='Function'>-</span><span class='Ligature'>โ€ฟ</span><span class='Function'>รท</span> <span class='Brace'>{</span><span class='Function'>๐•Ž</span><span class='Value'>๐•ฉ</span><span class='Brace'>}</span><span class='Modifier'>ยจ</span> <span class='Number'>4</span>
โŸจ ยฏ4 0.25 โŸฉ
</pre>
<p>In a call with no left argument, <code><span class='Value'>๐•จ</span></code> functions as <a href="nothing.html">Nothing</a> and <code><span class='Function'>๐•Ž</span></code> can't be used.</p>
<a class="replLink" title="Open in the REPL" target="_blank" href="https://mlochbaum.github.io/BQN/try.html#code=eygt8J2VqCnii4jwnZWpfSA2CgoyIHsoLfCdlagp4ouI8J2VqX0gNg==">โ†—๏ธ</a><pre>    <span class='Brace'>{</span><span class='Paren'>(</span><span class='Function'>-</span><span class='Value'>๐•จ</span><span class='Paren'>)</span><span class='Function'>โ‹ˆ</span><span class='Value'>๐•ฉ</span><span class='Brace'>}</span> <span class='Number'>6</span>
โŸจ 6 โŸฉ

    <span class='Number'>2</span> <span class='Brace'>{</span><span class='Paren'>(</span><span class='Function'>-</span><span class='Value'>๐•จ</span><span class='Paren'>)</span><span class='Function'>โ‹ˆ</span><span class='Value'>๐•ฉ</span><span class='Brace'>}</span> <span class='Number'>6</span>
โŸจ ยฏ2 6 โŸฉ
</pre>