Friday 3 June 2016

Haskell: Convert int (number) to string


By using show command you can convert integer, any other type to string.
*Main> let id =10
*Main> show id
"10"
*Main> 
*Main> let id = 102.345
*Main> show id
"102.345"
*Main> 
*Main> let id = True
*Main> show id
"True"
*Main>


Previous                                                 Next                                                 Home

No comments:

Post a Comment