[Haskell-beginners] Haskell Output Help

aditya siram aditya.siram at gmail.com
Thu Oct 22 22:59:22 EDT 2009


Sorry, forgot about the newline. How's this?

mapM putStrLn $ concat [["abc", "cde"], ["fgh", "ghi"]]

-deech

On Thu, Oct 22, 2009 at 9:53 PM, aditya siram <aditya.siram at gmail.com>wrote:

> Is this what you need?
>
> print $ foldl (++) [] [["abc", "cde"], ["fgh", "ghi"]]
>
> -deech
>
> On Thu, Oct 22, 2009 at 2: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 o line.
>>
>> If this is the initial list [["abc", "cde"] ["fgh", "ghi"]]
>> [["abc"
>>   "cde"]
>>  ["fgh",
>>   "ghi"]]
>>
>> Can anyone help me figure this out? Thanks.
>>
>>
>>
>>
>>
>> _______________________________________________
>> Beginners mailing list
>> Beginners at haskell.org
>> http://www.haskell.org/mailman/listinfo/beginners
>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.haskell.org/pipermail/beginners/attachments/20091022/9bd05e2e/attachment.html


More information about the Beginners mailing list