union slot = | None | Held : (heap {value : i32 * string} * heap {value : i32 * string}) let score x : i32 = match x with | None => 1i32 | Held (left, right) => inl left_opened = !!!!LayoutIndex(left) inl ~(a, b) = left_opened.value inl right_opened = !!!!LayoutIndex(right) inl ~(c, d) = right_opened.value if a =. 7i32 && !!!!EQ(b, "hi") && c =. 4i32 && !!!!EQ(d, "yo") then 0i32 else 1i32 inl main () : i32 = inl ~n = 7i32 inl ~word = "hi" inl left_pair = n, word inl left_heap = !!!!LayoutToHeap({value = left_pair}) inl ~m = 4i32 inl ~other = "yo" inl right_pair = m, other inl right_heap = !!!!LayoutToHeap({value = right_pair}) inl f (z : i32) : slot = if z =. 0i32 then None else Held (left_heap, right_heap) inl ~g = f score (g 1i32)