Sunday, 29 September 2013

Beginner to haskell

Beginner to haskell

`ver :: (Float,Float)->(Float,Float)->(Float,Float)->(Float,Float,Float)
ver g=sqrt((((fst x -fst y)^2)+((snd x -snd y)^2)))
ver g1=sqrt((((fst x -fst z)^2)+((snd x -snd z)^2)))
ver g2=sqrt((((fst y -fst z)^2)+((snd y -snd z)^2)))
():g++g1++g2`
I write this and I keep getting the error: naked expression at top level
What I want to do is to take the distance between 3 buildings and present
them as a tuple for exemple: (dAB,dBC,dAC)

No comments:

Post a Comment