# [Desmos][1], <s>51</s> <s>50</s> 45 [bytes][2]
```
o→\left\{i=0:[0],join(1,o!)\right\}
i=0
o=0
```
[Try It Online!][5] (Click the play button on the ticker up top (metronome icon) to run the program)

Desmos doesn't exactly have standard I/O support, but this should get the point across. Input is the i variable, output is the o variable. Each line is a separate expression, and the first expression needs to be in the ticker, as shown in the TIO.

EDIT: a surprising -1, apparently `→` parses properly as an action! Unfortunately, it still costs 3 bytes, which is the same as `\to`, BUT it allows me to change `\to join` to `→join` since the parser gets confused by `\tojoin`

EDIT: -5 thanks to zygan on discord who showed me that an action *itself* can be piecewise, and also me realizing that `o!` is shorter than `o^o` and doesn't even have to rely on wacky edge case behavior lol

Old 50 byte solution:

```
\left\{i=0:o→[0],o→join(1,o^o)\right\}
i=0
o=0
```

[Try It Online!][4] (Click the play button on the ticker up top (metronome icon) to run the program)

Old 51 byte solution:

```
\left\{i=0:o\to[0],o\to join(1,o^o)\right\}
i=0
o=0
```
[Try It Online!][3] (Click the play button on the ticker up top (metronome icon) to run the program)

[1]:https://www.desmos.com/
[2]:https://codegolf.meta.stackexchange.com/questions/19316/scoring-desmos-equations
[3]:https://www.desmos.com/calculator/z8dsafzmf4?nographpaper
[4]:https://www.desmos.com/calculator/lvw0v5x7x0?nographpaper
[5]:https://www.desmos.com/calculator/rtb6d9bjss?nographpaper