Trusted answers to developer questions
Trusted Answers to Developer Questions

Related Tags

haskell
communitycreator

How to convert int to string in Haskell

Chinweuba Elijah Azubuike

Overview

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

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.

Syntax

show 79

Parameter

This method accepts one parameter, the int.

Example

main = do
    let x = 6
    print(show x)

Explanation

We print 6, which is an integer, as a string.

RELATED TAGS

haskell
communitycreator

CONTRIBUTOR

Chinweuba Elijah Azubuike
RELATED COURSES

View all Courses

Keep Exploring