我不明白this--++和: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>
爲什麼不說,還回 「hithere」?
謝謝你給我介紹':t'! – Micah 2012-07-19 21:49:33
@Micah:嘗試':help' – 2012-07-19 22:13:00
@Micah:其他真正有用的是':info',它可以給你很多關於類型的信息。 – 2012-07-19 22:13:24