
22 Dec
2009
22 Dec
'09
4:20 a.m.
joeltt
do_solve_iter guess tried = do let actual = count_occurences guess if guess == actual then putStrLn "ANSWER!!" else if (find (==actual) tried) == Just actual then do putStrLn "NO ANSWER!" putStrLn tried else do putStrLn "ITER" do_solve_iter actual (actual : tried)
I think you need to have: else if (...) then ... else (that is, indent the then and else statements) Better way of doing it: use a case statement, maybe with guards. -- Ivan Lazar Miljenovic Ivan.Miljenovic@gmail.com IvanMiljenovic.wordpress.com