Sitzman <[EMAIL PROTECTED]> writes:
> Hey all.. Gosh, this feels embarrassing to ask.. but how do I get a string
> to print out with a carriage return in it? (like using \n in c++)...
>
> I want
> > listBooks :: [Book] -> [String]
> > listBooks [] = []
> > listBooks (Book lang year last first title:bs)
> > =
> (lang++","++year++","++last++","++first++","++title++"\n"):listBooks bs
>
> But instead it actually prints the \n! Doh ;-) I tried using single
> quotes instead of doubles and it didnt help... Thx much ;-)
You have to print the strings, not the list; try something like
printBookList = putStr . concat
printBooks = printBookList . listBooks
HTH,
Michael