Question : strings haskell
Answered by : renz-carillo
-- String are basically a list of char = [char]
-- string as an argument in a function
lines :: String -> String -- function declaration
lines _ = "CodeGrepper"
-- single line string
sampleString = "qwerty"
-- multi line string, below is read as qwerty qwerty
sampleString = "qwerty \ -- area between backslashes are ignored
qwerty"
Source : | Last Update : Thu, 26 May 22