type Point = object x, y: float proc dist(a, b: Point): float = let dx = a.x - b.x let dy = a.y - b.y result = (dx*dx + dy*dy).sqrt