Unification is currently implemented as a part of pattern matching in traits.
What if this was lifted into something more first class? What would it enable?
example:
const Point2 = Data({x: Number, y: Number})
const pt1 = Point2(12, _),
pt2 = Point2(_, 3)
const pt3 = unify(pt1, pt2)
pt3 === Point2(12, 3)
Unification is currently implemented as a part of pattern matching in traits.
What if this was lifted into something more first class? What would it enable?
example: