> I wrote a code, but seems to give "Time limit exceeded"!
??
Your code writes
15 to stdout which is correct (with the example given on the page)..
You have to explain what you mean by >>seems to give "Time limit exceeded"<<

> loop t function
Does already exist.
sequence $ replicate 10 function
is a much shorter way :-)

oor perhaps mapM_ [ function | i <- [1..10] ] )

prod, to_int:
You can both implement using higher order functions

prod = sum . zipWith (*)
to_int = map read

Marc
_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to