uaga Posted October 8, 2012 at 05:18 PM Report #478287 Posted October 8, 2012 at 05:18 PM a função é a seguinte: type Ponto = (Float,Float) dist :: Ponto1 -> Ponto2 -> Float dist Ponto1 Ponto2 = sqrt ( (Fst Ponto2 - Fst Ponto1)² + (Snd Ponto2 - Snd Ponto1)² ) e nao sei pq da erro .. agradecia se alguém me pudesse explicar a origem do erro
mundo Posted October 8, 2012 at 08:30 PM Report #478315 Posted October 8, 2012 at 08:30 PM 1º em haskell nao existe Fst nem Snd, tem que ser fst e respectivamente snd , quanto aos elevados usa-se algo como numero^2 1 Report
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now