Oregami
Repositories/oxedyne/fe2o3

oxedyne/fe2o3/fe2o3_austenite/tests/fixtures/eval/intro/state.typ

508 bytes, 1 run

created by r1870400018:64200, which is this file's identity for as long as the history lasts, whatever it is later renamed to

download · who wrote it · its history

1// State: initial values, set and function updates, independent keys, at and final.
2#let s = state("s", 1)
3#let t = state("t")
4#context [#metadata((s.get(), t.get())) <probe>]
5#s.update(5)
6#t.update("x")
7#context [#metadata((s.get(), t.get())) <probe>]
8#s.update(v => v * 3)
9#metadata(none) <mid>
10#s.update(v => (v, v))
11#context [#metadata((s.get(), s.at(<mid>), s.final(), t.final())) <probe>]
12#context [#metadata(state("s", 100).get()) <probe>]
13#context [#metadata(state("fresh", "init").final()) <probe>]