Logo

Programming-Idioms

History of Idiom 48 > diff from v47 to v48

Edit summary for version 48 by programming-idioms.org:
[Haskell] emphasize comments

Version 47

2019-02-16, 07:26:20

Version 48

2019-03-26, 21:19:50

Idiom #48 Multi-line string literal

Assign to variable s a string literal consisting in several lines of text

Idiom #48 Multi-line string literal

Assign to variable s a string literal consisting in several lines of text

Extra Keywords
multiline raw
Extra Keywords
multiline raw
Code
s = unlines [
     "several"
    ,"lines"
    ,"of"
    ,"text"]
Code
s = unlines [
     "several"
    ,"lines"
    ,"of"
    ,"text"]
Comments bubble
unlines concatenates a list of strings, inserting a newline between each. It is inverse to lines, which splits a string by newlines
Comments bubble
unlines concatenates a list of strings, inserting a newline between each.
It is inverse to lines, which splits a string by newlines
Doc URL
http://hackage.haskell.org/packages/archive/base/latest/doc/html/Prelude.html#v:unlines
Doc URL
http://hackage.haskell.org/packages/archive/base/latest/doc/html/Prelude.html#v:unlines