aboutsummaryrefslogtreecommitdiff
path: root/help/export.md
blob: 6f3970b2a2aef3660cbf518df8b805bf7f68c068 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
*View this file with results and syntax highlighting [here](https://mlochbaum.github.io/BQN/help/export.html).*

# Leftward Double Arrow (`⇐`)

## `n ⇐ v`: Export Definition
[→full documentation](../doc/expression.md#exports)

Define a variable with name `n` and export it from the current namespace.

        ns ← { exported ⇐ 5, unexported ← 0}
        ns.exported
        ns.unexported

## `n ⇐`: Export names
[→full documentation](../doc/expression.md#exports)

Export the names given in `n` from the current namespace. Names must be defined somewhere in the scope.

        ns1 ← { ⟨alsoexported⟩⇐, exported ⇐ 5, alsoexported ← 0}
        ns1.exported
        ns1.alsoexported