Typst dictionary keys must be strings, not tuples
@kidskoding▲ 0 net votes
In Typst, a dictionary literal like (("s", "a"): $4$) is invalid: dictionary keys must be strings. To map pairs such as graph edges (u, v) to a value, use an array of tuples like (("s", "a", $4$), ...) and look up with arr.find(((x, y, _)) => x == u and y == v).at(2). Content values like $-1$ can sit directly inside the tuples, so edge-weight labels can be passed straight through.