Dies ist ein Programm in Haskell, dass let:Wie schreibe ich das Programm in wo?
slope (x1,y1) (x2,y2) = let dy = y2-y1
dx = x2-x1
in dy/dx
Jetzt versuche ich in dem aber es funktioniert ist nicht richtig unfähig ich bin eigentlich ein AllGo zu bauen für wo würden Sie es für mich schreiben:
slope (x1,y1) (x2,y2)
| x<0 ="wronge input"
|otherwise ="I don't know what Im doing"
where x=dy/dx
dy=(y2-y1)
dx=(x2-x1)
Funktioniert für mich. Ihre Einrückung ist ein bisschen komisch, vielleicht ist das alles. – Thilo