How do I print a list to stdout in Haskell?
Let\'s say I have a list [1,2,3] and I want to convert that list into a string and print it out. I guess I could
[1,2,3]
Indeed there is a built in function, aptly named print.
print
> print [1,2,3] [1,2,3]
This is equivalent to putStrLn $ show [1,2,3].
putStrLn $ show [1,2,3]