You can also use auto as the return type. 
<https://nim-lang.github.io/Nim/manual.html#types-auto-type>
    
    
    type Point2d = tuple[x, y: float]
    
    proc sumPoints(p1, p2: Point2D): auto = (p1.x + p2.x, p1.y + p2.y)
    
    echo sumPoints((1.0, 2.0), (3.0, 4.0))
    
    
    Run

Reply via email to