Syntax for creating an extended record?

> type Base more = { a::Int, b::Int, c::Int | more }
> type Extended = Base ( d::Int, e::Int, f::Int )
> base = { a:1, b:2, c:3 }
> extend { a, b, c} = { a, b, c, d:4, e:5, f:6 }
> extend base
{ a: 1, b: 2, c: 3, d: 4, e: 5, f: 6 }

How can I define extend which can take a Base with just a/b/c and return an Extended with the same a/b/c and d/e/f added.

Here I define it by destructuring the a/b/c and repeating them. Is there a syntax that is less verbose?

You can use Record.merge

extend = merge { d: 4, e: 5, f: 6 }

Or Record.disjointUnion if you want to enforce that the input record doesn’t already have d, e, and f.

That’s the ticket. Thanks.