right now I have a String equal to "...\n...\n...". In my code I want to write this as a list (like ['a','b','c']), but how would this work with the \n? I checked in ghci if string == ['.','.','.','.','.','.','.','.','.'] and it said no, so does anyone know how I would write the \n’s in a Char list, thank you.
>Solution :
A String is a list of Characters, so "foo" and ['f', 'o', 'o'] are exactly the same.
For a new line character '\n' [wiki] you can escape this, so your string "...\n...\n..." is equivalent to:
['.', '.', '.', '\n', '.', '.', '.', '\n', '.', '.', '.']
You can thus for example filter with filter ('\n' /=) some_string to filter out new line characters from a String.