This is a program in Haskell that with let:
slope (x1,y1) (x2,y2) = let dy = y2-y1
dx = x2-x1
in dy/dx
Now I try in where but it's not working properly actually I am unable to build a allgo for where would you like to write it for me :
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)