blob: 48b455e6ffbc5bc891453ef00f45a79d39260736 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
<head>
<link href="../favicon.ico" rel="shortcut icon" type="image/x-icon"/>
<link href="../style.css" rel="stylesheet"/>
<title>BQN: Leftwards 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="leftwards-arrow-"><a class="header" href="#leftwards-arrow-">Leftwards Arrow (<code><span class='Gets'>←</span></code>)</a></h1>
<h2 id="n--v-define"><a class="header" href="#n--v-define"><code><span class='Value'>n</span> <span class='Gets'>←</span> <span class='Value'>v</span></code>: Define</a></h2>
<p>Defines a new variable with name <code><span class='Value'>n</span></code> and value <code><span class='Value'>v</span></code>.</p>
<p>Variable <code><span class='Value'>n</span></code> must not already exist in the scope.</p>
<a class="replLink" title="Open in the REPL" target="_blank" href="https://mlochbaum.github.io/BQN/try.html#code=4oqiIGEg4oaQIDEKCuKKoiBiIOKGkCAz4oC/MyDipYogNQoKQyDihpAg4oaR">↗️</a><pre> <span class='Function'>⊢</span> <span class='Value'>a</span> <span class='Gets'>←</span> <span class='Number'>1</span>
1
<span class='Function'>⊢</span> <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='Number'>5</span>
┌─
╵ 5 5 5
5 5 5
5 5 5
┘
<span class='Function'>C</span> <span class='Gets'>←</span> <span class='Function'>↑</span>
</pre>
|