String In Haskell

[Solved] String In Haskell | Haskell - Code Explorer | yomemimo.com
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

Answers related to string in haskell

Code Explorer Popular Question For Haskell