fork(1) 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)
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
[1 of 1] Compiling Main             ( prog.hs, prog.o )

prog.hs:2:7: error: Parse error in pattern: x1
stdout
Standard output is empty