type Point2D = tuple[x, y: float] func sumPoints(p1, p2: Point2D): Point2D = (p1.x + p2.x, p1.y + p2.y)
echo sumPoints((x:1.0, y:2.0), (x:3.0, y:4.0)) Don't be repeating the type in the args, nor failing to qualify the x, y parameters in the call.
type Point2D = tuple[x, y: float] func sumPoints(p1, p2: Point2D): Point2D = (p1.x + p2.x, p1.y + p2.y)
echo sumPoints((x:1.0, y:2.0), (x:3.0, y:4.0)) Don't be repeating the type in the args, nor failing to qualify the x, y parameters in the call.