Why am I getting parse error in input function...what I am actually trying to do is finding the gcd of the list...pls help... Here is my Haskell Code... import System.IO
gcd :: Int -> Int -> Int gcd a b | b == 0 =a | otherwise = gcd b (a mod b)
answer :: List -> Int answer list = foldl (gcd) list
input :: Int -> List input n | n /= 0 s <- readLn return (words s) putStrLn answer s n = n - 1 input n
main=do hSetBuffering stdin LineBuffering n <- getLine if n /= 0 then putStrLn answer input nsubmitted by pvkcse
[link] [3 comments]
I've finally purchased a domain for myself and now I have a place to use as a showroom of my personal games, take a look (and download them): http://games.tnegri.com/
Also, my blog is now hosted at http://blog.tnegri.com/. Nice! Right?
My vacations are just starting out and I already have a new domain.
Also, bought a slackline starter kit (I will try it for the first time), a frisbee, a boomerang and a frescobol kit!
I'm so happy. :)
Happy holidays to everyone!