Euclidean distance in Haskell