[Haskell-beginners] Haskell Output Help

Chaddaï Fouché chaddai.fouche at gmail.com
Fri Oct 23 09:39:26 EDT 2009


On Thu, Oct 22, 2009 at 9:11 PM, Chandni Navani <chandni_ca at yahoo.com>wrote:

> I have a list of lists which all contain strings.  [[String]].  I need to
> figure out how to print them so that after each individual string, there is
> a new line.
>
> If this is the initial list [["abc", "cde"] ["fgh", "ghi"]]
> [["abc"
>   "cde"]
>  ["fgh",
>   "ghi"]]
>
> Can anyone help me figure this out? Thanks.
>
>
You can use unlines and concat :

> putStr . unlines . concat $ [["abc", "cde"] ["fgh", "ghi"]]

-- 
Jedaï
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.haskell.org/pipermail/beginners/attachments/20091023/04ca00dc/attachment.html


More information about the Beginners mailing list