main n = putStrLn (replicate n '*') main n = putStrLn (take n (repeat '*')) main n = sequence (take n (repeat (putStr "*"))) (but that doesn't have a final new line. The more complicated: main n = sequence (take (n - 1) (repeat (putStr "*"))) >> putStrLn "*" should solve that problem.) /g On 6/16/06, Jenny678 <mestor1@gmx.de> wrote:
Hello,
Can somebody help me
I want to work with putStrLn main n = putStrLn "*"
for example How must I define the code that:
main 5 *****
Thanks for any help -- View this message in context: http://www.nabble.com/putStrLn-t1799896.html#a4905456 Sent from the Haskell - Haskell-Cafe forum at Nabble.com.
_______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
-- We have lingered in the chambers of the sea By sea-girls wreathed with seaweed red and brown Till human voices wake us, and we drown.