Types & data

Destructuring bindings

When a function hands back a record, you can pull its fields into named locals in a single binding — the same pattern you write in a match arm, used right in a fix:

This is Ascent’s answer to tuples: a multi-value return is a named record, and you unpack it here by field name. Because it’s by name and not position, a reorder can’t silently swap things — fix Split{ rest, whole } = ... still binds each correctly.

It only works when the pattern can’t fail — a single-variant record. A union variant might not match the value, so that one still has to go through a match, where the other cases get handled.