[Haskell-cafe] putStrLn
J. Garrett Morris
trevion at gmail.com
Fri Jun 16 14:21:43 EDT 2006
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 at 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 at 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.
More information about the Haskell-Cafe
mailing list