News for hackers. Stuff that matters.
Re:A New Typst Template for Pandoc by cbolton on Thursday May 28, 2026 @10:29AM (#48309454)
> My only complaint is that all functions are pure functions; there is not a way (that I know of) to share state from one function invocation to the next.

Indeed user-defined functions are pure. You can work around it like the suiji package[1] does: have the function return a value that you pass as argument to the next call.

[1] Random number generator in Typst: https://typst.app/universe/package/suiji/

There are no comments on this comment yet.