
Hi Mukesh, mukesh tiwari wrote:
...I am trying to implement elliptic curve prime factorisation and initially wrote function "addPoints" using let in clause. It works fine. When i converted the "addPoint" using where clause then its not working and not adding the points correctly .... In case of indentation problem , source code on http://hpaste.org/49174 .
Your suspicion is correct. It is an indentation problem. The first "where" is indented more than "(_, d') -> Right d'" so it is part of that case. It has no effect, because none of the variables defined in the "where" is used in that case, only d'. The second "where" is indented less than the last case, so it applies to the entire "addPoints" function, all the way back to the beginning! Regards, Yitz