Mathijs Kwik schreef op 10-5-2014 13:55:oke,
Roelof Wobben <r.wobben@home.nl> writes:
Hello,should be:
I have to find the center of 2 points as a assigment for a course on fpcomplete. This is no homework because I do a self-study.
So I did this:
center (x1,y1) (x2,y2) = ( ((x1+x2)/2),((y1+y2)/2) )
main = print $ center ((1,2), (3, 4))
center (x1,y1) (x2,y2) = ( ((x1+x2)/2),((y1+y2)/2) )
main = print $ center (1,2) (3, 4)
as I see you changed the main function but I have to make the center function work not change the main function.
Roelof
_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe