aboutsummaryrefslogtreecommitdiff
path: root/help/nothing.md
blob: 23aee6ba5e3fe8a3fb07da6f0174aaa8f2f8fda8 (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
*View this file with results and syntax highlighting [here](https://mlochbaum.github.io/BQN/help/nothing.html).*

# Middle Dot (`·`)

## `·`: Nothing
[→full documentation](../doc/expression.md#nothing)

Indicates no value. If a left argument is Nothing, the function is called with no left argument, and if the right is Nothing, it's not called and "returns" Nothing.

        · ⌽ "abc"  # Reverse instead of Rotate

### In Trains

Nothing can serve as a left argument in a train to string together multiple monadic functions.

        (-+-) 5

        (-·+-) 5

### Destructuring

For pattern matching in assignment or a block header, Nothing indicates an unused value.

        F ← {𝕊 a‿·‿b: a∾b}

        F 1‿2‿3