joeltt <[email protected]> writes:
>     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
[email protected]
IvanMiljenovic.wordpress.com
_______________________________________________
Haskell-Cafe mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to