distance :: { x :: Number, y :: Number } -&gt; Number<p>distance point = sqrt(point.x^2 + point.y^2)<p>The function application of sqrt shouldn&#x27;t have parens.<p>And the type of distance should be<p>distance :: forall r. { x :: Number, y :: Number | r} -&gt; 
Number<p>Otherwise, it&#x27;s not row-polymorphic and you wouldn&#x27;t be able to apply distance to a record of type Point3D.