Haskell: Show screwed up?

前端 未结 6 505
小鲜肉
小鲜肉 2021-01-17 17:34

The show function in Haskell doesn\'t seem to do what it should:

Prelude> let str = \"stack\\n\\noverflow\"
Prelude> putStrLn str
stack


overfl         


        
6条回答
  •  有刺的猬
    2021-01-17 18:17

    "which function is similar to show but can return strings containing newlines?"

    Answer: id

提交回复
热议问题