Skip to content
Blog

Union functions

Union functions are used to perform unions on values.

FunctionDescriptionExampleResult
union_value(tag := value)create a union with given valueunion_value(a := 1)1
union_tag(union)return the tag of unionunion_tag(union_value(a := 1))a
union_extract(union, tag)return the value for given tagunion_extract(union_value(a := 1), 'a')1