Range consolidation: Difference between revisions

m (→‎{{header|Phix}}: removed an unnecessary deep_copy(), inlined the rs>re test)
Line 710:
{{trans|C#}}
 
<lang dyalect>type Pt(s, e) with Lookup
func Pt.Min() => min(this.s, this.e)
Line 725:
func overlap(left, right) =>
left.Max() > right.Max() ? right.Max() >= left.Min()
when: left.Max() >= right.MaxMin()
else left.Max() >= right.Min()
func consolidate(left, right) => Pt(min(left.Min(), right.Min()), max(left.Max(), right.Max()))
Anonymous user