packages feed

typst-0.9: test/typ/compiler/destructuring-00.typ

#let (_, (x, y, _)) = (1, (2, 3, 4))
#test((x, y), (2, 3))

#let (x: (v, _, w), p) = (p: 1, x: (5, 6, 7))
#test((v, w, p), (5, 7, 1))

#let (x: (n, o: (_, h), m), r) = (r: 1, x: (m: 5, n: 6, o: (7, 8)))
#test((n, h, m, r), (6, 8, 5, 1))

#let (_, (x,)) = (1, (12,))
#test(x, 12)

#let f = (_, (x, (_, y), ..)) => (x, y)
#test(f(21, (22, (0, 23), 24)), (22, 23))
#let f = (_, (x, y: (_, y), ..)) => (x, y)
#test(f(1, (x: 2, y: (0, 3))), (2, 3))