相关疑难解决方法(0)

有什么区别++和:在haskell中?

我不明白 -

Prelude> "hi"++"there"
"hithere"
Prelude> "hi":"there"

<interactive>:12:6:
    Couldn't match expected type `[Char]' with actual type `Char'
    Expected type: [[Char]]
      Actual type: [Char]
    In the second argument of `(:)', namely `"there"'
    In the expression: "hi" : "there"
Prelude> 
Run Code Online (Sandbox Code Playgroud)

为什么不回归"hithere"?

haskell ghci

4
推荐指数
2
解决办法
2407
查看次数

标签 统计

ghci ×1

haskell ×1