I am making calculating 2^(n-1) mod n. I had a problem with Haskell.
parse error (possibly incorrect indentation or mismatched brackets)
|
5 | | (mod e 2 == 0) = md (mod b*b m) (div e 2) m r
| ^
But the problem is I don't know what is the problem
modf :: Int -> Int
modf n = md 2 (n-1) n r
where
md b e m r
| (mod e 2 == 0) = md (mod b*b m) (div e 2) m r
| otherwise = md (mod b*b m) (div e 2) m (mod r*b m)
|) with at least one space - Willem Van Onsemr(which is indeed correct) - Willem Van Onsem