From the 2nd example:<p>class Rect(left, top, right, bottom)<p>fun rect_like_to_rect(v):
match v
| Rect(_, _, _, _): v
| {"LT": [l, t], "RB": [r, b]}: Rect(l, t, r, b)
| {"TL": [t, l], "RB": [b, r]}: Rect(l, t, r, b)<p>rect_like_to_rect({"TL": [0, 2], "RB": [10, 5]})
// ⇒ Rect(0, 2, 10, 5)<p>Isn't this wrong? I'd expect to see Rect(2, 0, 5, 10) instead.<p>It also seems like "RB" was meant to be "BR".