Haskell:將 Int 轉換爲 String - Haskell: Converting Int to String

問題:

I know you can convert a String to an number with read :我知道您可以使用readString轉換爲數字:

Prelude> read "3" :: Int
3
Prelude> read "3" :: Double 
3.0

But how do you grab the String representation of an Int value?但是如何獲取Int值的String表示呢?


解決方案:

參考一: https://en.stackoom.com/question/BgJb
參考二: https://stackoom.com/question/BgJb
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章