fork download
  1.  
  2. dist (x1, y1) (x2, y2) = sqrt (dx*dx + dy*dy)
  3. where
  4. dx = x1- x2
  5. dy = y1 - y2
  6.  
  7.  
  8. p1 = (1,1)
  9. p2 = (3,3)
  10. p3 = (7,7)
  11.  
  12.  
  13. main = do
  14. print $ (dist p1 p2) + (dist p2 p3) == (dist p1 p3)
Success #stdin #stdout 0s 8388607KB
stdin
Standard input is empty
stdout
False