While developing, it’s useful to convert int
to a string
. In this shot, we’ll learn how to do just that in Haskell.
Haskell is a statically typed, functional, and concurrent programming language with a dynamic range of packages.
The show
method is used to convert an int
value to string
.
show 79
This method accepts one parameter, the int
.
main = dolet x = 6print(show x)
We print 6
, which is an integer, as a string.