1{-# LANGUAGE UnicodeSyntax #-}
2module Main where
3
4data Point = Point
5 { pointX, pointY ::Double
6 , name ::String
7 } deriving (Show)
8
9distance ::Point ->Point ->Double
10distance x y =
11 let t� = (pointX x - pointX y)^2
12 t� = (pointY x - pointY y)^2
13 in sqrt $ t� + t�
14
15