aboutsummaryrefslogtreecommitdiff
path: root/docs/help/change.html
blob: 172b4c58dd169b7fac29e2ffcbe351de5993d8e6 (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
<head>
  <link href="../favicon.ico" rel="shortcut icon" type="image/x-icon"/>
  <link href="../style.css" rel="stylesheet"/>
  <title>BQN: Leftwards Arrow With Hook (↩)</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="leftwards-arrow-with-hook-"><a class="header" href="#leftwards-arrow-with-hook-">Leftwards Arrow With Hook (<code><span class='Gets'></span></code>)</a></h1>
<h2 id="n--v-change"><a class="header" href="#n--v-change"><code><span class='Value'>n</span> <span class='Gets'></span> <span class='Value'>v</span></code>: Change</a></h2>
<p><a class="fulldoc" href="../doc/expression.html#assignment">→full documentation</a></p>
<p>Changes the value of variable with name <code><span class='Value'>n</span></code> to value <code><span class='Value'>v</span></code>.</p>
<p>Variable <code><span class='Value'>n</span></code> must already exist.</p>
<a class="replLink" title="Open in the REPL" target="_blank" href="https://mlochbaum.github.io/BQN/try.html#code=YSDihqkgMQoK4oqiIGIg4oaQIDMKCuKKoiBiIOKGqSAiQmUgdGhlIGNoYW5nZSB5b3Ugd2lzaCB0byBzZWUgaW4gdGhlIHdvcmxkLiI=">↗️</a><pre>    <span class='Value'>a</span> <span class='Gets'></span> <span class='Number'>1</span>
<span class='Error'>Error: Undefined identifier</span>

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

    <span class='Function'></span> <span class='Value'>b</span> <span class='Gets'></span> <span class='String'>&quot;Be the change you wish to see in the world.&quot;</span>
"Be the change you wish to see in the world."
</pre>
<h2 id="n-f-modify"><a class="header" href="#n-f-modify"><code><span class='Value'>n</span> <span class='Function'>F</span><span class='Gets'></span></code>: Modify</a></h2>
<p><a class="fulldoc" href="../doc/expression.html#assignment">→full documentation</a></p>
<p>Apply function <code><span class='Function'>F</span></code> to existing variable <code><span class='Value'>n</span></code>, and assign the result back to <code><span class='Value'>n</span></code>.</p>
<a class="replLink" title="Open in the REPL" target="_blank" href="https://mlochbaum.github.io/BQN/try.html#code=4oqiIGIg4oy94oap">↗️</a><pre>    <span class='Function'></span> <span class='Value'>b</span> <span class='Function'></span><span class='Gets'></span>
".dlrow eht ni ees ot hsiw uoy egnahc eht eB"
</pre>
<h2 id="n-f-v-modify"><a class="header" href="#n-f-v-modify"><code><span class='Value'>n</span> <span class='Function'>F</span><span class='Gets'></span> <span class='Value'>v</span></code>: Modify</a></h2>
<p><a class="fulldoc" href="../doc/expression.html#assignment">→full documentation</a></p>
<p>Assign <code><span class='Value'>n</span> <span class='Function'>F</span> <span class='Value'>v</span></code> to <code><span class='Value'>n</span></code>.</p>
<a class="replLink" title="Open in the REPL" target="_blank" href="https://mlochbaum.github.io/BQN/try.html#code=4oqiIGIg4oaTy5zihqkgNg==">↗️</a><pre>    <span class='Function'></span> <span class='Value'>b</span> <span class='Function'></span><span class='Modifier'>˜</span><span class='Gets'></span> <span class='Number'>6</span>
" eht ni ees ot hsiw uoy egnahc eht eB"
</pre>